RFR: 8290866: Apple Color Emoji turns gray after JavaFX version 18 [v3]
Phil Race
prr at openjdk.org
Fri Feb 24 21:21:54 UTC 2023
> This fix properly supports colour rendering of Emoji on macOS
>
>
> On other platforms the Emoji will be rendered as ordinary greyscale glyphs - if there is font
> support for the requested code point.
>
> A simple manual test is provided which uses a Text node, Label control
> and editable TextField control.
>
> Some highlights of the code
> - To determine if it is a color emoji glyph probe the 'sbix' font table which is what is used by Apple
> - Text runs now break at an Emoji glyph
> - The Emoji is retrieved as an BGRA image - ie 4 channel including alpha
> - It was necessary to retrieve the Emoji glyph bounds via a different CoreText API since
> the bounds that were being retrieved were wrong for the Emoji image - causing clipping
> - It was necessary to retrieve the Emoji code point advance via a CoreText API since
> the HMTX metrics were very wrong - causing overlapping glyphs
> - drawString checks if it is an Emoji run and redirects to a new drawColorGlyph method
> which draws the image as a texture
> - All 3 rendering pipelines have this support and have been verified on all 3 desktop platforms
Phil Race has updated the pull request incrementally with one additional commit since the last revision:
8290866
-------------
Changes:
- all: https://git.openjdk.org/jfx/pull/1047/files
- new: https://git.openjdk.org/jfx/pull/1047/files/acff6dab..cae5274c
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jfx&pr=1047&range=02
- incr: https://webrevs.openjdk.org/?repo=jfx&pr=1047&range=01-02
Stats: 3 lines in 1 file changed: 0 ins; 1 del; 2 mod
Patch: https://git.openjdk.org/jfx/pull/1047.diff
Fetch: git fetch https://git.openjdk.org/jfx pull/1047/head:pull/1047
PR: https://git.openjdk.org/jfx/pull/1047
More information about the openjfx-dev
mailing list