Skip to content

Commit

Permalink
8322251: [Linux] JavaFX is not displaying CJK on Ubuntu 23.10 and later
Browse files Browse the repository at this point in the history
Backport-of: 5182ea16ace78c4f61e2c38981aab62f6153294e
  • Loading branch information
prrace committed Apr 25, 2024
1 parent bbad358 commit 77e7e25
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions modules/javafx.graphics/src/main/native-font/fontpath_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,13 @@ Java_com_sun_javafx_font_FontConfigManager_getFontConfig

fontformat = NULL;
(*FcPatternGetString)(fontPattern, FC_FONTFORMAT, 0, &fontformat);
/* We only want TrueType fonts for Java FX */
if (fontformat != NULL
&& (strcmp((char*)fontformat, "TrueType") != 0)) {
/* We only want OpenType fonts for Java FX :
* ie TrueType and CFF format fonts.
*/
if ((fontformat != NULL) &&
((strcmp((char*)fontformat, "TrueType") != 0) &&
(strcmp((char*)fontformat, "CFF") != 0)))
{
continue;
}
result = (*FcPatternGetCharSet)(fontPattern,
Expand Down

1 comment on commit 77e7e25

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.