3 releases

0.1.3 Feb 12, 2021
0.1.2 Jan 19, 2021
0.1.1 Jan 19, 2021
0.1.0 Jan 18, 2021

#32 in #opentype

22 downloads per month

MIT/Apache

12KB
254 lines

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.

Dependencies

~770KB
~18K SLoC