Conversation
Starting work on bitmap support and figured I'd tackle the low hanging fruit first. This includes basic codegen for parsing sbix along with a tiny helper method to load `GlyphData` for a given glyph id. Working towards #593
cmyr
left a comment
There was a problem hiding this comment.
looks good, I think matching the glyf/loca API is the right idea (not that there is another clear alternative, so 🤷)
| /// Bit 0: Set to 1. | ||
| /// Bit 1: Draw outlines. | ||
| /// Bits 2 to 15: reserved (set to 0). | ||
| flags: u16, |
There was a problem hiding this comment.
we might want to define a flags type for this?
There was a problem hiding this comment.
Good call. The unnamed bit 0 that must always be set to 1 seems problematic for the codegen flags type. Wdyt about wrapping in a record and implementing default and appropriate methods for the “render outlines bit” instead?
There was a problem hiding this comment.
I think an easier option would be to use flags, but use the compile_with annotation to provide a fn that ensures that bit one is always set when writing.
There was a problem hiding this comment.
Since I'm adding compile_with, went ahead and extended this for write support. Should be good to go.
Starting work on bitmap support and figured I'd tackle the low hanging fruit first. This includes basic codegen for parsing sbix along with a tiny helper method to load
GlyphDatafor a given glyph id.Working towards #593