ttf-utils

Crates.iottf-utils
lib.rsttf-utils
version0.1.3
sourcesrc
created_at2021-01-18 13:51:54.09505
updated_at2021-02-12 14:40:44.985499
descriptionttf-parser utils
homepage
repositoryhttps://github.com/chrsan/ttf-utils
max_upload_size
id343526
size31,780
Christer Sandberg (chrsan)

documentation

README

ttf-utils

Crates.io Documentation

Post-processing utilities for ttf-parser.

Example

Embolden and slant a glyph outline.

let face = ttf_parser::Face::from_slice(&font_data, 0).unwrap();
let glyph_id = face.glyph_index('c').unwrap();
let mut outline = ttf_utils::Outline::new(&face, glyph_id).unwrap();
outline.embolden(20.0);
outline.oblique(0.25);
outline.emit(&mut builder);

Credits

The embolden algorithm is derived from the algorithm in FreeType.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 11

cargo fmt