3 releases
0.1.3 | Feb 12, 2021 |
---|---|
0.1.2 | Jan 19, 2021 |
0.1.1 |
|
0.1.0 | Jan 18, 2021 |
#32 in #opentype
22 downloads per month
12KB
254 lines
ttf-utils
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
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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