ttf-parser-utils

Crates.iottf-parser-utils
lib.rsttf-parser-utils
version0.1.1
created_at2025-03-26 23:32:33.203309+00
updated_at2025-03-27 00:42:01.936179+00
descriptionA crate with embolden, slant, and modify bbox utils for ttf-parser
homepage
repositoryhttps://github.com/TimTheBig/ttf-utils
max_upload_size
id1607310
size32,549
Ryan (TimTheBig)

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_parser_utils::Outline::new(&face, glyph_id).unwrap();
outline.embolden(20.0);
outline.oblique(0.25);
outline.emit(&mut builder);

Credits

This is an updated fork of ttf-utils.

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: 19

cargo fmt