#true-type #otf #opentype

no-std owned_ttf_parser

ttf-parser plus support for owned data

29 releases (breaking)

0.25.0 Oct 4, 2024
0.24.0 Jul 2, 2024
0.23.0 Jul 2, 2024
0.20.0 Oct 22, 2023
0.8.0 Jul 23, 2020

#55 in Data formats

Download history 112723/week @ 2025-01-28 150031/week @ 2025-02-04 304207/week @ 2025-02-11 331926/week @ 2025-02-18 363176/week @ 2025-02-25 376035/week @ 2025-03-04 374012/week @ 2025-03-11 326496/week @ 2025-03-18 326927/week @ 2025-03-25 294849/week @ 2025-04-01 289534/week @ 2025-04-08 233791/week @ 2025-04-15 255269/week @ 2025-04-22 264396/week @ 2025-04-29 253305/week @ 2025-05-06 207107/week @ 2025-05-13

1,009,548 downloads per month
Used in 1,720 crates (9 directly)

Apache-2.0

155KB
254 lines

Extends ttf_parser with owned version of Face: OwnedFace.

Re-exports ttf_parser::*.

Example

use owned_ttf_parser::{AsFaceRef, Face, OwnedFace};

let owned_face = OwnedFace::from_vec(owned_font_data, 0).unwrap();
let face_ref: &Face<'_> = owned_face.as_face_ref();

assert_eq!(face_ref.ascender(), 2254);

owned_ttf_parser crates.io Documentation

ttf-parser plus support for owned data.

Provides OwnedFace, AsFaceRef and re-exports ttf_parser::*.

Example

use owned_ttf_parser::{AsFaceRef, OwnedFace, Face};

let owned_face = OwnedFace::from_vec(owned_face_data, 0).unwrap();
let face_ref: &Face<'_> = owned_face.as_face_ref();

assert_eq!(face_ref.ascender(), 2254);

no_std

no_std environments are supported using alloc.

owned_ttf_parser = { default-features = false }

Minimum supported rust compiler

All crates maintained with latest stable rust.

Dependencies

~1MB
~20K SLoC