RFR: 8322251: [Linux] JavaFX is not displaying CJK on Ubuntu 23.10 and later
Phil Race
prr at openjdk.org
Wed Apr 10 19:42:09 UTC 2024
On Wed, 10 Apr 2024 19:09:52 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> The Linux font lookup code is rejecting CFF OpenType fonts.
>> Since these are becoming common because of the Noto family this could soon be quite a problem.
>> I expect this fix is a candidate for backporting.
>
> modules/javafx.graphics/src/main/native-font/fontpath_linux.c line 417:
>
>> 415: */
>> 416: if ((fontformat != NULL) &&
>> 417: ((strcmp((char*)fontformat, "TrueType") != 0) &&
>
> Code in `javax.web` uses `equalLettersIgnoringASCIICase` in a similar situation, should we use case-insensitive comparison here?
I thought about that but we have been using specific-case here for ever for TrueType and also in the Java 2D code - which BTW does allow CFF already and it looks for 'CFF' and more to the point the fontconfig API we are using itself explicitly looks for 'CFF' which it in turn gets by using freetype to examine font files and the API in freetype it uses says
<pre>
* FT_Get_Font_Format
*
* @description:
* Return a string describing the format of a given face. Possible values
* are 'TrueType', 'Type~1', 'BDF', 'PCF', 'Type~42', 'CID~Type~1', 'CFF',
* 'PFR', and 'Windows~FNT'.
</pre>
So it is baked in from the start what case is used.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1439#discussion_r1559969032
More information about the openjfx-dev
mailing list