1[package]
2name = "ttf-parser"
3version = "0.25.1"
4authors = [
5 "Caleb Maclennan <caleb@alerque.com>",
6 "Laurenz Stampfl <laurenz.stampfl@gmail.com>",
7 "Yevhenii Reizner <razrfalcon@gmail.com>",
8 "خالد حسني (Khaled Hosny) <khaled@aliftype.com>"
9]
10keywords = ["ttf", "truetype", "opentype"]
11categories = ["parser-implementations"]
12license = "MIT OR Apache-2.0"
13description = "A high-level, safe, zero-allocation font parser for TrueType, OpenType, and AAT."
14repository = "https://github.com/harfbuzz/ttf-parser"
15documentation = "https://docs.rs/ttf-parser/"
16readme = "README.md"
17edition = "2018"
18rust-version = "1.63.0"
19exclude = ["benches/**"]
20
21[dependencies]
22core_maths = { version = "0.1.0", optional = true } # only for no_std builds
23
24[features]
25default = ["std", "opentype-layout", "apple-layout", "variable-fonts", "glyph-names"]
26# Enables the use of the standard library.
27# When disabled, the `no-std-float` feature must be enabled instead.
28std = []
29no-std-float = ["core_maths"]
30# Enables variable fonts support. Increases binary size almost twice.
31# Includes avar, CFF2, fvar, gvar, HVAR, MVAR and VVAR tables.
32variable-fonts = []
33# Enables GDEF, GPOS, GSUB and MATH tables.
34opentype-layout = []
35# Enables ankr, feat, format1 subtable in kern, kerx, morx and trak tables.
36apple-layout = []
37# Enables glyph name query via `Face::glyph_name`.
38# TrueType fonts do not store default glyph names, to reduce file size,
39# which means we have to store them in ttf-parser. And there are almost 500 of them.
40# By disabling this feature a user can reduce binary size a bit.
41glyph-names = []
42# Enables heap allocations during gvar table parsing used by Apple's variable fonts.
43# Due to the way gvar table is structured, we cannot avoid allocations.
44# By default, only up to 32 variable tuples will be allocated on the stack,
45# while the spec allows up to 4095. Most variable fonts use 10-20 tuples,
46# so our limit is suitable for most of the cases. But if you need full support, you have to
47# enable this feature.
48gvar-alloc = ["std"]
49
50[dev-dependencies]
51base64 = "0.22.1"
52pico-args = "0.5"
53tiny-skia-path = "0.11.4"
54xmlwriter = "0.1"
55
56[package.metadata.typos.default]
57locale = "en-us"
58
59[package.metadata.typos.default.extend-words]
60loca = "loca"
61ot = "ot"
62trak = "trak"
63wdth = "wdth"
64