-
Notifications
You must be signed in to change notification settings - Fork 18
COLR table #196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
COLR table #196
Conversation
whereswaldon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this together @benoitkugler! I think it looks reasonable, though I lack your deep expertise in the internals of opentype. My only real question is whether we need so many implementations of binary search? Not a huge deal though. Great work!
I'm not a big fan of the sort.Search API, but I guess it is OK as a temporary solution until we can use go 1.21 and |
andydotxyz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry it took so long. I agree the search could be cleaner - but also that having it this way until base version increases to 1.21 makes sense.
I'm hoping to bump Fyne version to there soon (months though, not days)...
| } | ||
|
|
||
| func TestLoadColor(t *testing.T) { | ||
| ld := readFontFile(t, "color/NotoColorEmoji-Regular.ttf") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't see those files in this PR or the repo before the PR - apologies if I am missing something obvious.
But given that I cannot understand how the tests are passing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are loading the test files from the typesetting-utils module, so that typesetting remains lightweight.
This is a first step towards support for the COLR/CPAL tables.
We expose a new
GlyphColortype returned byFace.GlyphData. With this API, a renderer may now load the layers defining a colored glyph and combine them. This could be implemented for instance in go-text/render.This PR is probably not enough to support variable fonts, but starting with non variable ones should already be pretty nice.