-
Notifications
You must be signed in to change notification settings - Fork 217
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
feat: implementation of Colrv1 fonts #225
Merged
Merged
Conversation
This file contains 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
this one contaisn the basics including all but shading painting and composite layers
… should also verify it looks actually right
…ix to take effect, lets commit what i got now
… Skia does it. gimme a nice object with quite a bit of reuse but without the template hassle. and can actually be used outside of the text context and in general shades
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.
The following includes a fairly comprehensive implementation of Colrv1 fonts. This complements a move started in #224.
So this means - we got colorful Emojis :).
Most of the operators of Colrv1 are implemented (Note that Colrv0 is already supported with current release, which is how window's Segoe UI Emoji is providing its emojis). check out the Colrv1 (PDFWriterTesting\ColorEmojiColrV1.cpp) test for a demonstration. It uses a colrv1 version of Googles Noto font.
I did leave out a few things at at this point, and there's also some additional limitations for the implementation which will probably stay there:
WriteText
. It is NOT provided viaTj
and other operators. I did this because Drawing emojis is not compatible with usages ofTj
, which current model of usage respects. Drawing emojis requires drawing multiple glyphs and creates shades, and apply matrixes and the lot, which is way out of scope for a simpleTJ
which is supported by surrounding operators likeTm
and such. I could have, however, do better in that if someone wants to useWriteText
as one would useTj
, without setting color and position. If i do this, one can useWriteText
interchangeably withTj
regardless of intended font usage, getting special considerations only for Emoji fonts and characters. usage might motivate me to do better.WriteText
is supported.But lets not dwell on this. check out those lovely emojis:
ColorEmojiColrV1.pdf