Cargo Features

[dependencies]
owned_ttf_parser = { version = "0.25.0", default-features = false, features = ["std", "no-std-float", "variable-fonts", "opentype-layout", "apple-layout", "glyph-names", "gvar-alloc"] }
default = apple-layout, glyph-names, opentype-layout, std, variable-fonts

These default features are set whenever owned_ttf_parser is added without default-features = false somewhere in the dependency tree.

std default gvar-alloc?

Activates usage of std. When disabled, the no-std-float feature must be enabled instead.

Enables std of ttf-parser

no-std-float

Enables no-std-float of ttf-parser

variable-fonts default

Enables variable fonts support. Increases binary size almost twice.
Includes avar, CFF2, fvar, gvar, HVAR, MVAR and VVAR tables.

Enables variable-fonts of ttf-parser

opentype-layout default

Enables GDEF, GPOS and GSUB tables.

Enables opentype-layout of ttf-parser

apple-layout default

Enables ankr, feat, format1 subtable in kern, kerx, morx and trak tables.

Enables apple-layout of ttf-parser

glyph-names default

Enables glyph name query via Face::glyph_name. TrueType fonts do not store default glyph names, to reduce file size, which means we have to store them in ttf-parser. And there are almost 500 of them. By disabling this feature a user can reduce binary size a bit.

Enables glyph-names of ttf-parser

gvar-alloc = std

Enables heap allocations during gvar table parsing used by Apple's variable fonts.
Due to the way gvar table is structured, we cannot avoid allocations.
By default, only up to 32 variable tuples will be allocated on the stack,
while the spec allows up to 4095. Most variable fonts use 10-20 tuples,
so our limit is suitable for most of the cases. But if you need full support, you have to enable this feature.

Enables gvar-alloc of ttf-parser