-
Notifications
You must be signed in to change notification settings - Fork 3
Fonts
This page describes how to design suitable images for the provided converter. For a more low-level description of how fonts are stored, e.g. to write your own conversion scripts, please see Font data.
To help understand the description below, you can look at one of the example fonts.
The image must be in one of the supported formats (usually PNG or BMP). It must also be a multiple of 8 pixels tall—since that's the height of a glyph.
The image must only contain three colours: black, white, and a third colour hereafter referred as “the filler colour”. That last one doesn't need to be transparent (for example, some of the demo's fonts use magenta instead), but it's useful to think of it as such.
Each glyph is represented by a rectangle of black and/or white pixels. This rectangle can be of any width, but only up to 7 pixels.
Glyph rectangles must be separated by rectangles of “filler” pixels. Such padding is also permitted on the left and/or right sides of the image.
Though not required, the most common layout is to place glyphs in an 8×8-pixel grid. (Note that empty grid cells will not generate a glyph!)
You can either:
- Download a pre-built binary from the releases page (make sure it matches the version of gb-vwf you are using!)
- Or build it yourself by installing Rust and running
cargo build --release
in thefont_encoder
directory,
The program only converts a single font at a time; try running it without arguments or with the --help
option to get usage information.