Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

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