abrasion/third_party/cargo/vendor/owned_ttf_parser-0.6.0
q3k 2938a31682 third_party: bump everything 2021-01-07 23:38:16 +00:00
..
fonts third_party: bump everything 2021-01-07 23:38:16 +00:00
src third_party: bump everything 2021-01-07 23:38:16 +00:00
tests third_party: bump everything 2021-01-07 23:38:16 +00:00
.cargo-checksum.json third_party: bump everything 2021-01-07 23:38:16 +00:00
BUILD.bazel third_party: bump everything 2021-01-07 23:38:16 +00:00
CHANGELOG.md third_party: bump everything 2021-01-07 23:38:16 +00:00
Cargo.toml third_party: bump everything 2021-01-07 23:38:16 +00:00
LICENSE third_party: bump everything 2021-01-07 23:38:16 +00:00
README.md third_party: bump everything 2021-01-07 23:38:16 +00:00

README.md

owned_ttf_parser crates.io Documentation

ttf-parser plus support for owned data.

Provides OwnedFont, AsFontRef and re-exports ttf_parser::*.

Example

use owned_ttf_parser::{AsFontRef, OwnedFont, Font};

let owned_font = OwnedFont::from_vec(owned_font_data, 0).unwrap();
let font_ref: &Font<'_> = owned_font.as_font();

assert_eq!(font_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.