Registry / utility / ttf-parser

ttf-parser

JSON →
library0.25.1rscratesunverified

A high-level, safe, zero-allocation font parser for TrueType, OpenType, and AAT fonts.

# Cargo.toml [dependencies] ttf-parser = "0.25.1"
INSTALL
IMPORT
SIG · TTF-PARSER
T
ttf-parser
utilityrustv0.25.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Face
use ttf_parser::Face;

Parse a font file and access glyph information

use ttf_parser::Face; let font_data = std::fs::read("font.ttf").unwrap(); let face = Face::parse(&font_data, 0).unwrap(); println!("Number of glyphs: {}", face.number_of_glyphs());
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.25.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
ttf-parser — cargo add ttf-parser · libregistry