Skip to main content

Module font

Module font 

Source
Expand description

PSF2 bitmap font loading and character rendering.

Authors: MarioS271

Structsยง

Psf2Font
A loaded and parsed PSF2 font, ready for rendering into a BasicFramebuffer.
Psf2Header ๐Ÿ”’
Parsed PSF2 file header. Only the fields needed for rendering are extracted.

Staticsยง

BACKGROUND_COLOR ๐Ÿ”’
Pixel color written for bits that are 0 in the glyph bitmap (background).
DEFAULT_FOREGROUND_COLOR ๐Ÿ”’
Pixel color used when the caller passes None as the foreground color.
MAGIC_NUMBER ๐Ÿ”’
Expected first four bytes of a valid PSF2 file.