Skip to main content

Module cache

Module cache 

Source
Expand description

Tables parsed once for a font and kept.

A parsed table borrows the bytes it came from, so it cannot simply be stored beside them. Yoke makes that expressible by holding the parsed value together with the tables it borrows, behind an Arc that outlives both however they are dropped.

Every table gets its own cell, so reading one never drags in another. That matters for glyf and loca, which outlines and metrics in both directions all read, and for gvar, which is typically about half a variable font and must not be read to answer what another table can.

StructsΒ§

CbdtTables πŸ”’
Color bitmaps in CBDT, with the CBLC that locates them.
Cff2Font πŸ”’
Charstring outlines from the CFF2 table.
CffFont πŸ”’
Charstring outlines from the CFF table.
ColrTables πŸ”’
The COLR table and the variation tables its paints use.
CpalTable πŸ”’
The color palettes in CPAL.
EbdtTables πŸ”’
Monochrome and grayscale bitmaps in EBDT, with the EBLC that locates them.
GlyfLoca πŸ”’
The outline tables.
GvarTable πŸ”’
The table that varies glyf outlines.
HvarTable πŸ”’
The table of horizontal metric variations.
MetricsTable πŸ”’
The glyph metrics of one direction.
SbixTable πŸ”’
PNG bitmaps in sbix.
TableCache πŸ”’
A parsed table held beside the tables it borrows.
VorgTable πŸ”’
The table of glyph vertical origins.
VvarTable πŸ”’
The table of vertical metric variations.

FunctionsΒ§

units_per_em πŸ”’
Returns the design units per em that the font’s metrics use.