-
Notifications
You must be signed in to change notification settings - Fork 2
Add initial color support #60
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18cd76e to
5b3b575
Compare
Contributor
Author
|
Currently trying a different approach. Should be ready in a business day or 2 |
Some items are incomplete: - Bounding boxes could use some work. This uses the same algorithm that was already in place. - Text is parsed line-by-line. We should probably use harfbuzz to handle all positioning. - For colr fonts, we use `DrawSettings` with `Size::unscaled` and handle the scaling manually. We should use the built-in scaling.
ce505dc to
d9e19da
Compare
dfrg
approved these changes
Dec 23, 2025
Member
dfrg
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.
A few nits but generally LGTM for initial color support. I'm curious to see how this evolves to support layers/blending.
- Apply transformation to gradients, not just their points - Rename ColorPainter -> GlyphPainter
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support is added by:
Utilizing Skrifa's ColorGlyph.
Creating a pen that can capture ColorGlyph instructions
Converting the instructions into tiny_skia calls
Seems to match fonts.google.com for colors+linear_gradients
Follow up