yeslogic / allsorts

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

Use a high level data description language for describing the font reading and writing #20

Open brendanzab opened 4 years ago

brendanzab commented 4 years ago

Our plan is to use a binary data description language to generate the (currently handwritten) font parsing code. We've been working for a while on yeslogic/ddl to this end, but it's taken some time to get to grips with what approach we want to take with it. It has however influenced the current way we've implemented the parsing which can be found in allsorts::binary.

We don't have to support parsing the entirety of OpenType just yet before we start making progress on this. Given enough features in the data description language we'll be able to parse certain subsets of the binary format before we try doing the entire thing. I think the minimum we'll need is: