Registry / utility / rusttype

rusttype

JSON →
library0.9.3rscratesunverified

A pure Rust alternative to libraries like FreeType, providing an API for loading, querying and rasterising TrueType fonts.

# Cargo.toml [dependencies] rusttype = "0.9.3"
INSTALL
IMPORT
SIG · RUSTTYPE
R
rusttype
utilityrustv0.9.3
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.

Font
use rusttype::Font;

Load a TrueType font from bytes

use rusttype::Font; fn main() { let font_data = include_bytes!("font.ttf"); let font = Font::try_from_bytes(font_data).expect("Invalid font"); println!("Font loaded: {:?}", font); }
Debug
Known issues
breakingRustType is no longer actively maintained; consider using ab_glyph or ttf-parser instead.
fix
Migrate to ab_glyph for similar functionality with active maintenance.
affects: >=0.9.0
Upgrade
Version history
0.9.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
6
Amazon
1
Resources
rusttype — cargo add rusttype · libregistry