Registry / other / fontdue

fontdue

JSON →
library0.9.3rscratesunverified

A simple no_std font parser and rasterizer.

# Cargo.toml [dependencies] fontdue = "0.9.3"
INSTALL
IMPORT
SIG · FONTDUE
F
fontdue
otherrustv0.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 fontdue::Font;

Load a font and rasterize a glyph.

use fontdue::Font; fn main() { let font_data = include_bytes!("path/to/font.ttf"); let font = Font::from_bytes(font_data, fontdue::FontSettings::default()).unwrap(); let (metrics, bitmap) = font.rasterize('A', 32.0); println!("Rasterized 'A' at 32px: {}x{}", metrics.width, metrics.height); }
Debug
Known issues
gotchaThe `rasterize` method returns a bitmap in a custom format; coordinate system may differ from other libraries.
fix
Check the documentation for bitmap layout and metrics interpretation.
affects: >=0.1.0
Upgrade
Version history
0.9.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
fontdue — cargo add fontdue · libregistry