fschutt / printpdf

An easy-to-use library for writing PDF in Rust
https://docs.rs/printpdf/
MIT License
777 stars 95 forks source link

Replace rusttype with owned_ttf_parser #99

Closed robinkrahl closed 3 years ago

robinkrahl commented 3 years ago

Rusttype 0.8 is outdated and no longer maintained. ab_glyph is its successor, but for printpdf’s use case, it is sufficient to use ttf-parser (or, more precisely, owned_ttf_parser) directly.

Therefore, this patch replace rusttype with owned_ttf_parser. Users with more advanced use cases can use other crates by implementing printpdf’s FontData trait.

Fixes #75.


Maybe it would make sense to make owned_ttf_parser an optional dependency so that people who use their own FontData implementation don’t have to pull in owned_ttf_parser.