Repository navigation
feat(text): colour emoji render in their own colours, not the words' - #284
Merged
Merged
Conversation
A title painted every glyph as an outline filled with the words' colour, which a colour emoji face has none of: draws() skipped any face whose glyphs were not outlines, so Noto Color Emoji was never even borrowed and the emoji fell to a monochrome fallback face - the white text of jub0t#276 - or to a .notdef box where nothing else had it. A glyph that colours itself now stays out of the line's path and is laid over the words once they are painted: a bitmap strike (CBDT/CBLC, sbix) decoded to its box, or a COLR v0 face's layers outlined in their palette colours. Plain pictures, as asked - no shadow and no stroke on either. A colour face is also borrowed before a monochrome one whatever weight the title asked for, so DejaVu and Symbola only get an emoji when no colour face has it. Faces that could only draw with constructs this crate does not follow - COLR v1 gradients, clips, transforms, SVG documents - are not counted as able to draw, and a glyph whose paint turns out unsupported falls back to its outline as before: nothing that used to paint now paints nothing. The layered case is tested on a COLR face cut from the bundled one inside the test, so it runs on a machine with no fonts installed at all; the bitmap case borrows the machine's colour emoji face and skips when it has none. Fixes jub0t#276 Signed-off-by: minecart551-prog <minecart551@gmail.com>
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
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.
A title painted every glyph as an outline filled with the words' colour, which a colour emoji face has none of: draws() skipped any face whose glyphs were not outlines, so Noto Color Emoji was never even borrowed and the emoji fell to a monochrome fallback face - the white text of #276 - or to a .notdef box where nothing else had it.
A glyph that colours itself now stays out of the line's path and is laid over the words once they are painted: a bitmap strike (CBDT/CBLC, sbix) decoded to its box, or a COLR v0 face's layers outlined in their palette colours. Plain pictures, as asked - no shadow and no stroke on either. A colour face is also borrowed before a monochrome one whatever weight the title asked for, so DejaVu and Symbola only get an emoji when no colour face has it.
Faces that could only draw with constructs this crate does not follow - COLR v1 gradients, clips, transforms, SVG documents - are not counted as able to draw, and a glyph whose paint turns out unsupported falls back to its outline as before: nothing that used to paint now paints nothing.
The layered case is tested on a COLR face cut from the bundled one inside the test, so it runs on a machine with no fonts installed at all; the bitmap case borrows the machine's colour emoji face and skips when it has none.
Fixes #276