Skip to main content

Module metrics

Module metrics 

Source

Functionsยง

advance_units_to_pt
Convert a font-unit advance to PDF user-space points.
ascent
Ascender height for font at size points.
base14_glyph_units ๐Ÿ”’
Width of a single character in a Base14 face, in 1/1000 em. WinAnsi natives go through the baked O(1) table; extended glyphs (Latin Extended-A, math operators, ligatures) go through the baked sorted name index. Anything else (Cyrillic, CJK, emoji) silently returns the width of ?; the PDF emit path renders those characters as ? too, so widths and content stream stay in sync. Embedded families exist precisely so callers wanting real coverage can opt out of this ?-everywhere behaviour.
descent
Descender depth for font at size points, as a positive number (the AFM/TTF storage convention is negative; both backends normalise on the way out).
glyph_width
Width of a single glyph in font at size points.
text_width
Advance width of text rendered in font at size points.