Skip to main content

Module fonts

Module fonts 

Source
Expand description

Original systemless bitmap fonts + Mac font-family routing.

Text renders by blitting pre-computed 8-bit coverage bitmaps out of the pixel_font modules — no runtime rasterization, no hinting decisions, no threshold knobs, no CLUT-closest-match. Every glyph pixel is exactly 0 or 255, so the downstream ShapeOp::Glyph partial-alpha branch never fires.

Each face is authored as hand-editable ASCII art in a pixel_font module and lowered to static glyph tables by const fn at compile time — no offline baker, no external font asset. The systemless faces are named after Australian native plants and stand in for the classic Mac families, which survive only as internal compatibility identifiers:

Mac font family (compat ID)systemless face
ChicagoJarrah
Geneva / Application / HelveticaKurrajong
Monaco / CourierMallee
New York / TimesIronbark
VeniceWattle
LondonKarri
CairoGrevillea

All glyphs are original artwork authored for systemless; no third-party font data is used. See the “Font Data” section of the crate README for the full mapping and trademark / non-affiliation notice.

Re-exports§

pub use self::heuristics::FONT_APPLICATION;
pub use self::heuristics::FONT_ATHENS;
pub use self::heuristics::FONT_CAIRO;
pub use self::heuristics::FONT_CHICAGO;
pub use self::heuristics::FONT_COURIER;
pub use self::heuristics::FONT_GENEVA;
pub use self::heuristics::FONT_HELVETICA;
pub use self::heuristics::FONT_LONDON;
pub use self::heuristics::FONT_LOSANGELES;
pub use self::heuristics::FONT_MOBILE;
pub use self::heuristics::FONT_MONACO;
pub use self::heuristics::FONT_NEWYORK;
pub use self::heuristics::FONT_SANFRAN;
pub use self::heuristics::FONT_SEATTLE;
pub use self::heuristics::FONT_SYMBOL;
pub use self::heuristics::FONT_TIMES;
pub use self::heuristics::FONT_TORONTO;
pub use self::heuristics::FONT_VENICE;

Modules§

heuristics
Font-specific rendering heuristics
override_format
Stable on-disk schema for runtime font overrides.
pixel_font
Hand-authored bitmap fonts, decoded at compile time.

Structs§

FontFace
One baked (font_id, size) face: metrics plus a slice of glyph descriptors and a shared coverage-byte buffer that the descriptors’ data_offset fields index into.
FontMetrics
Mac-style font metrics for a single (face, size) pair. Returned by GetFontInfo ($A88B) via get_font_metrics.
Glyph
Single-character bitmap descriptor: dimensions + offset into the shared data byte buffer. Coverage bytes are always exactly 0 or 255 — the ASCII-art source is const fn-decoded to a binary mask, so the ShapeOp::Glyph partial-alpha branch never fires.
ItalicFace
FontFace analogue with pre-baked italic strikes. Synthesised at draw time today via shear-blit (no italic strikes baked yet), but the type is in place so a future bake step can plug in.
MacRomanFace
FontFace analogue covering Mac Roman extended characters (codes 0x80..=0xFF). Currently has no entries — the built-in faces don’t populate these yet — but the type stays so the get_macroman_glyph API surface is stable.
MacRomanGlyph
Mac Roman extended glyph (code 0x80..=0xFF). Preserved for callers that expect the type; the built-in faces don’t populate Mac Roman extended tables yet so get_macroman_glyph returns None.

Constants§

MONO_COVERAGE_THRESHOLD
Threshold at which coverage is treated as “fully set” when collapsing to a 1-bit destination. Baked glyph data is exclusively 0 or 255 so this is effectively inert for the glyph path; kept for shape-op callers that share the threshold constant.

Statics§

FONT_NAMES
FONT_TABLE

Functions§

font_id_for_name
font_name_for_id
get_font_face
get_font_face_or_default
get_font_face_scaled
get_italic_glyph
get_macroman_glyph