Skip to main content

Module limits

Module limits 

Source
Expand description

Limits applied when interpreting font data.

Font files can describe structures that recurse, refer to themselves, or are simply enormous. Nothing here comes from the OpenType specification: these are the bounds this crate places on how much work one operation will do before giving up, so that a malformed or hostile font cannot turn a parse into a hang.

Constants§

MAX_COMPOSITE_EDGES
Maximum number of references followed while assembling one composite glyph, whether a glyf component tree or a VARC graph.
MAX_FEATURE_INDICES
Maximum total number of feature indices visited across the language systems of a layout table.
MAX_LANGSYS
Maximum number of language systems visited in a layout table’s script list.
MAX_LANGSYS_FEATURE_COUNT
Maximum total number of feature indices referenced by the language systems visited when pruning a layout table’s language systems.
MAX_LOOKUP_VISIT_COUNT
Maximum number of lookups visited by one layout closure operation.
MAX_OUTLINE_POINTS
Maximum number of points in a single assembled outline.
MAX_RECURSION_DEPTH
Maximum depth for structures that nest.
MAX_SCRIPTS
Maximum number of scripts visited in a layout table’s script list.