ttf-parser
ttf-parser copied to clipboard
Support COLR v1 table.
TODO:
- [ ] ClipList table
- [ ] Variations
- [ ] PaintColrGlyph
- [ ] Recursion detection
- [ ] Documentation
- [ ] Tests
@laurmaedje beta quality, but seems to be working ok-ish. Here is font2svg
output:
Some stuff is hard to represent in SVG, like weird transforms order, sweep gradients, gradients rotation (?), some blending modes.
For you this just a progress report and you can try out the new API.
PS: I've added colr::Table::is_simple
to reject v1 tables in case you do not plan to support them yet.
Some stuff is hard to represent in SVG, like weird transforms order, sweep gradients, gradients rotation (?), some blending modes.
About sweep gradients
: https://github.com/Lorp/samsa-core/issues/3
With the stagnation of the SVG2 specification(issue), SVG can no longer keep up with the times.
That hack would work only in a browser. And we can ignore sweep gradients completely for now. font2svg is just a demo. It doesn't have to be perfect.
Maybe this helps, FYI. https://github.com/googlefonts/oxidize/pull/48
It's a bit different, but thanks.
@laurmaedje I've published a new ttf-parser with COLR v0. No timeline for v1.
If you think you don't have time to finish it, I can look into finishing this in the next few weeks.
Yeah, no plans for this month. And it's a tricky beast.
Maybe would have time to at least update the ttf-explorer.
Do you know if there is also some way I can view the "reference" of how each glyph is supposed to look to compare? Something like font2svg
, but where we know that it (should) already work correctly.
Okay, looks like hb-view
supports it. I think I should be able to work with that.
I was using Chrome.
Could you tell me how exactly you used Chrome to test it? So how did you make it show the glyphs that you wanted to test?
Via this page: https://fonts.google.com/noto/specimen/Noto+Color+Emoji/glyphs
Superseded by #145