Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jdeeny/octofont
Convert TrueType (ttf) fonts to Octo code for Chip8
https://github.com/jdeeny/octofont
Last synced: about 1 month ago
JSON representation
Convert TrueType (ttf) fonts to Octo code for Chip8
- Host: GitHub
- URL: https://github.com/jdeeny/octofont
- Owner: jdeeny
- License: mit
- Created: 2016-10-02T05:31:13.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-05-08T10:57:01.000Z (over 3 years ago)
- Last Synced: 2024-05-16T10:37:56.539Z (7 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-chip-8 - octofont - Convert TrueType (ttf) fonts to Octo code for CHIP-8. (Software development / Tools)
README
# octofont
```ttf-to-textfont``` will convert a TrueType font into a 'textfont' file, which is a simple text file describing a bitmapped font.
```textfont-to-octo``` will convert the textfont file into [Octo](http://johnearnest.github.io/Octo/) assembly code.
An intermediate file is used so that the font can be hand edited before the final conversion.
This is a hacked-up work in progress. To get full functionality, you will need to edit the source code. ```textfont-to-octo``` is
especially rough. Currently limited to 8x8px or smaller glyphs.Many improvements could be made:
- Handling of larger glyphs, using multiple sprite ops and/or 16-bit SuperChip sprites
- A sparse mode with a glyph location lookup table to avoid lots of 0s
- A fixed width mode without a width table
- Variable height glyphs
- Optional output of sample test code
- Additional functions, such as drawing a string
- Advanced kerning rules
- Optional guards for out-of-bounds inputs
- Better handling of vertical alignment and the font baseline. Clipping the glyphs with a bounding box is not helping with this.
- Use of register aliases