Expand description
Font metadata stored at import as fontMetas, in the shape Eagle’s font
parser produces (see the Import chapter of the docs).
Each name table entry becomes a map from language code to text, keyed
by the entry’s name (fontFamily, postScriptName, …), followed by
numGlyphs, support and weight.
Structs§
- Font
Info - The font viewer’s information panel, read from
fontMetasas Eagle’s viewer reads it: each name in English when the font has it, else its first language. Missing names are empty.
Constants§
- SAMPLE_
LANGUAGES - The sample languages Eagle’s “change language” offers, as stored in
fontMetas.preferLng, with their names.
Functions§
- font_
metas - Builds
fontMetasfor a font file’s bytes, orNoneif it can’t be parsed.fallback_idnames a font whose table has no names at all. - names
- The
nametable as Eagle’s parser reads it: entries in table order, each a map from language code to text. A later record for the same entry and language replaces the earlier text but keeps its position. - parse
- Parses a font file (ttf, otf, or the first face of a ttc); unpack
WOFF and WOFF 2 with
sfntfirst. - sfnt
- Unpacks a WOFF or WOFF 2 file into the plain sfnt it wraps; other data
is returned as is. From WOFF 2, tables stored with a transform (the
packed
glyf/locaandhmtx) are left out: metadata needs only the names,maxp,cmapand the other plain tables. - weight
- Eagle’s weight label, guessed from the PostScript name, then from the subfamily, with “ Italic“ added when the PostScript name says so.