-
Notifications
You must be signed in to change notification settings - Fork 541
8290866: Apple Color Emoji turns gray after JavaFX version 18 #1047
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
Conversation
|
👋 Welcome back prr! A progress list of the required criteria for merging this PR into |
|
/reviewers 2 |
Webrevs
|
|
@kevinrushforth |
|
On a side note, it seems FX does not currently support rendering of flag emoji sequences such as 🇺🇦 is this something we ought to be supporting? |
|
Another question: on non-retina monitor, emojis appear blurry when text size is set to 12. I vaguely recall that when resizing down, the resizing operation might be followed by a sharpening filter (or perhaps some other op can be used?). |
| if (isColorGlyph()) { | ||
| return (w * 4); // has alpha | ||
| } else { | ||
| return isLCDGlyph() ? w * 3 : w; |
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.
indentation?
I tried the same size and sequence and in the provided test and did the same move from retina to external and there is NO clipping in any of Text/Label/TextField. |
Perhaps .. but that is beyond the scope of this fix. |
We just get the image from the OS. |
or specific to my Mac Ventura 13.1. In my test, i am setting the font explicitly. A simpler test clips the flag symbols on both retina and the external monitor: |
|
"[\ud83c\uddfa\ud83c\udde6\u2764\ufe0f\ud83c\udfc1\ud83c\uddfa\ud83c\uddf8\ud83d\udd25\ud83e\udd8b\n\ud83d\ude00 \ud83d\ude03 \ud83d\ude04 \ud83d\ude01 \ud83d\ude06 \ud83d\ude05 \ud83e\udd23 \ud83d\ude02\n\ud83d\ude42 \ud83d\ude43 \ud83d\ude09 \ud83d\ude0a \ud83d\ude07]"; |
I have no idea why Ventura would make a difference but your "simpler" app works with no clipping on macOS 12.6.1 which is what I have ... |
kevinrushforth
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.
My testing all looks good. Since all of the changes for the shader-based pipelines are in BaseShaderGraphics, I decided it might be interesting to try this with the metal pipeline (from the jfx-sandbox:metal branch). And... it just worked!
I did a partial code review (I'll finish this afternoon) and left a few comments and questions.
modules/javafx.graphics/src/main/java/com/sun/javafx/font/PrismFontFile.java
Show resolved
Hide resolved
modules/javafx.graphics/src/main/java/com/sun/javafx/font/PrismFontFile.java
Show resolved
Hide resolved
modules/javafx.graphics/src/main/java/com/sun/javafx/font/PrismFontFile.java
Outdated
Show resolved
Hide resolved
modules/javafx.graphics/src/main/java/com/sun/javafx/font/PrismFontFile.java
Show resolved
Hide resolved
modules/javafx.graphics/src/main/java/com/sun/javafx/font/PrismFontFile.java
Show resolved
Hide resolved
modules/javafx.graphics/src/main/java/com/sun/javafx/font/coretext/CTGlyph.java
Show resolved
Hide resolved
My best guess is they tweaked something in the font and anyway this is NOT Emoji rendering. |
andy-goryachev-oracle
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.
tested w/MonkeyTester on Mac Ventura 13.1
LGTM
kevinrushforth
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.
Looks good. I'll reapprove if you want to fix the typo in the instructions.
modules/javafx.graphics/src/main/java/com/sun/javafx/font/PrismFontFile.java
Show resolved
Hide resolved
|
@prrace This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 3 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
|
/integrate |




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
the bounds that were being retrieved were wrong for the Emoji image - causing clipping
the HMTX metrics were very wrong - causing overlapping glyphs
which draws the image as a texture
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jfx pull/1047/head:pull/1047$ git checkout pull/1047Update a local copy of the PR:
$ git checkout pull/1047$ git pull https://git.openjdk.org/jfx pull/1047/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1047View PR using the GUI difftool:
$ git pr show -t 1047Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1047.diff