Skip to content

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

COLR table #196

wants to merge 8 commits into from

Conversation

benoitkugler
Copy link
Contributor

@benoitkugler benoitkugler commented Jun 23, 2025

This is a first step towards support for the COLR/CPAL tables.

We expose a new GlyphColor type returned by Face.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.

Copy link
Member

@whereswaldon whereswaldon left a 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!

@benoitkugler
Copy link
Contributor Author

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 slices.BinarySearchFunc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants