@techandsoftware/teletext
v1.2.0
Published
API to render teletext pages using vector graphics in the browser DOM
Downloads
173
Maintainers
Readme
This package renders teletext pages using vector graphics (SVG).
- Rich API to draw text and graphics
- Support for teletext level 1, 1.5 and parts of 2.5
- Scalable, high-resolution rendering
Quickstart with CDN:
<div id="teletextscreen"></div>
<script type="module">
import { Teletext } from 'https://cdn.jsdelivr.net/npm/@techandsoftware/teletext@latest/dist/teletext.min.js';
const teletext = Teletext();
teletext.addTo('#teletextscreen');
teletext.setRow(0, 'Hello world!');
</script>For local development, install the module and import the following if you're using vite or similar tooling:
import { Teletext } from '@techandsoftware/teletext';It can also be run in nodejs by passing in a DOM window, see the API.
Docs
License
The project is licensed under GNU Affero General Public License 3 AGPL-3.0-only. For commercial support and integration enquiries, contact [email protected].
The fonts supplied in the demo/fonts directory have their own licenses. See the *.license files in that directory.
This package is compliant with REUSE 3.
Credits
- Unscii font used for block graphics when
setVieworenhance().putG3()is called - http://viznut.fi/unscii/ - Native font stack adapted from Bootstrap's - https://getbootstrap.com/docs/4.5/content/reboot/#native-font-stack
- The internal API used for drawing SVG is a subset of svg.js v3 - https://svgjs.dev/docs/3.0/
- Teletext test pages from https://teletextarchive.com/
- The data format for stored test pages and for the
loadPageFromEncodedStringAPI is from Simon Rawles' teletext editor - https://edit.tf/ - The Output Line format is taken from MRG's .tti file spec - https://zxnet.co.uk/teletext/documents/ttiformat.pdf
