Skip to main content

Module font

Module font 

Source
Expand description

Pixel8’s built-in pixel font.

An original 3-pixel-wide glyph set in a 4x7 cell. Uppercase fills the full cap height; lowercase are shorter x-height glyphs with true ascenders and descenders, so case reads correctly in case-sensitive Rust source. Each glyph is six rows; in every row the leftmost pixel is bit 2 (0b100).

Constants§

GLYPH_H
Line height in pixels.
GLYPH_W
Advance width of one character cell in pixels.
UNKNOWN
Glyph used for characters outside the printable ASCII range.

Functions§

glyph
Look up the glyph rows for a character.
text_width
Pixel width of a string when printed with the built-in font.