googlefonts / fontations

Reading and writing font files
Apache License 2.0
375 stars 23 forks source link

Font sanitization replacement for OpenType Santizer #680

Open jrmuizel opened 11 months ago

jrmuizel commented 11 months ago

How hard would it be to build a replacement for https://github.com/khaledhosny/ots using this crate? It would be nice to have a pure rust alternative to OTS

rsheeter commented 11 months ago

@khaledhosny wdyt?

khaledhosny commented 11 months ago

OTS basically reads the tables and the (reading code does bounds checking and rejects the table otherwise), then runs various checks to sanitize the data and if everything passes it writes the table back. For most of the table it parses to a data structure so it can fix things that can be fixed instead of rejecting the font.