schrift-rs
libschrift is a lightweight TrueType rendering library implemented in C, and this crate wraps the libschrift library into safe Rust. The result is a font loading and glyph rendering crate with no runtime dependencies other than the C and Rust standard libraries.
The following example code renders a single glyph into a PGM file:
use *;
let font = load_from_file.unwrap;
let sch = build
.with_scale
.flag_y_downwards
.build;
let aglyph = sch
.glyph_lookup
.expect;
let mut pxdata = vec!;
sch.render.expect;
let mut pgm = Stringnew;
pgm.push_str;
for y in 0..16
write.unwrap;