Skip to main content

Module font_style

Module font_style 

Source
Expand description

Shared font name / weight helpers (DRY across Type1 / Type3 / TrueType).

Functionsยง

resolve_base_font_name
Prefer /BaseFont, then FontDescriptor /FontName, else "Unknown".
resolve_font_weight
Resolve final numeric weight: /FontWeight โ†’ name token โ†’ StemV.
weight_from_font_name
Parse a CSS / OpenType weight from a PostScript or variable-font name.