yeslogic / allsorts

Font parser, shaping engine, and subsetter implemented in Rust
https://yeslogic.com/blog/allsorts-rust-font-shaping-engine/
Apache License 2.0
706 stars 23 forks source link

Serializing into WOFF2? #101

Closed gendx closed 3 months ago

gendx commented 6 months ago

It seems that the subset() function is hard-coded to output the result in OpenType format. I was wondering if you would consider adding a way to serialize into WOFF2 format as well? WOFF2 can be useful for web contexts, to embed the font into SVG files, etc.

wezm commented 6 months ago

While possible, I don't think this would be a high priority as it's fairly easy to convert a TTF to WOFF2 with something like woff2_compress from https://github.com/google/woff2. Also be aware of #27 in regards to subsetting.