[OpenJDK 2D-Dev] [13] JDK-8219901: Noto fonts for East Asian countries cannot belong to CompositeFont
Philip Race
philip.race at oracle.com
Mon Jun 3 00:02:14 UTC 2019
Approved and pushed.
-phil
On 5/20/19, 5:20 AM, Toshio 5 Nakamura wrote:
> Hi phil,
> Do you have chance to check this proposal again?
> To relieve your worry, I tested all locales additionally with
> Ubuntu16.04, 18.04, RHEL7, 8, and CentOS7. There were
> many improvements.
> But, acutually, this testcase in the proposal detected two
> other issues. I believe the root causes are different, and
> they can be treated separately. Details are in the bug DB.
> By the way, Noto CJK fonts v2.001 [1] seems to change
> their fullname to the same one as familyname. So, this problem
> doesn't exist with the new version.
> Anyway, since many distributions still use Noto CJK fonts v1.001,
> I believe this proposal is still useful.
> [1] https://github.com/googlefonts/noto-cjk
> JBS: https://bugs.openjdk.java.net/browse/JDK-8219901
> Webrev.02: http://cr.openjdk.java.net/~tnakamura/8219901/webrev.02/
> <http://cr.openjdk.java.net/%7Etnakamura/8219901/webrev.02/>
> Thanks,
> Toshio Nakamura
>
> ----- Original message -----
> From: "Toshio 5 Nakamura" <TOSHIONA at jp.ibm.com>
> Sent by: "2d-dev" <2d-dev-bounces at openjdk.java.net>
> To: philip.race at oracle.com
> Cc: 2d-dev at openjdk.java.net
> Subject: Re: [OpenJDK 2D-Dev] [13] JDK-8219901: Noto fonts for
> East Asian countries cannot belong to CompositeFont
> Date: Tue, Apr 30, 2019 7:58 PM
> Hi Phil,
> Thank you so much for the review and pointing out.
> I updated the webrev to cover non-English results by testcase side.
> Additionally, I need another fix in FcFontConfiguration.java.
> From internationalization view point, we need to tell zh_CN and zh_TW,
> and fcinfo's file name requires not only language but also country.
> I tested this with major locales under Ubuntu 16.04, 18.04, CentOS 7,
> RHEL7 and 8beta.
> Could you kindly review this again?
> http://cr.openjdk.java.net/~tnakamura/8219901/webrev.02/
> <http://cr.openjdk.java.net/%7Etnakamura/8219901/webrev.02/>
> Thanks,
> Toshio Nakamura
>
> ----- Original message -----
> From: Phil Race <philip.race at oracle.com>
> To: Toshio 5 Nakamura <TOSHIONA at jp.ibm.com>,
> jayathirth.d.v at oracle.com
> Cc: 2d-dev at openjdk.java.net
> Subject: Re: [OpenJDK 2D-Dev] [13] JDK-8219901: Noto fonts for
> East Asian countries cannot belong to CompositeFont
> Date: Fri, Apr 26, 2019 7:26 AM
>
> The test fails for me when I set the Japanese locale. I am
> using Ubuntu 16.04.
> Have you done any locale testing ?
>
> env|grep LANG
> LANG=ja_JP.UTF-8
> GDM_LANG=ja_JP
> LANGUAGE=ja_JP.UTF-8
> $ ~/jdk-client/build/linux-x86_64-server-release/jdk/bin/java
> FCCompositeTest
> PF=Noto Sans Mono CJK JP Regular
> FC=Noto Sans Mono CJK JP Regular
> PF=TakaoPGothic
> FC=Takao P????????????
> java.lang.RuntimeException: FullName mismatch:
> TakaoPGothic,Takao P????????????
> at FCCompositeTest.test(FCCompositeTest.java:92)
> at FCCompositeTest.main(FCCompositeTest.java:52)
> Exception in thread "main" java.lang.RuntimeException: Method
> invocation exception
> at FCCompositeTest.test(FCCompositeTest.java:97)
> at FCCompositeTest.main(FCCompositeTest.java:52)
>
> -phil.
> On 4/23/19 3:14 AM, Toshio 5 Nakamura wrote:
>> I apologize if my poor description caused confusion.
>> Hi Jay,
>> Thank you so much for your review.
>> Hi phil,
>> I'm looking forward to hearing your results.
>> Noto font is expected to be used more widely, and I'm eager
>> to fix this problem.
>> I welcome any suggestions or comments.
>> Thanks,
>> Toshio Nakamura
>>
>> ----- Original message -----
>> From: Jayathirth Rao <jayathirth.d.v at oracle.com>
>> <mailto:jayathirth.d.v at oracle.com>
>> To: Toshio 5 Nakamura <TOSHIONA at jp.ibm.com>
>> <mailto:TOSHIONA at jp.ibm.com>
>> Cc: Philip Race <philip.race at oracle.com>
>> <mailto:philip.race at oracle.com>, 2d-dev at openjdk.java.net
>> <mailto:2d-dev at openjdk.java.net>
>> Subject: Re: [OpenJDK 2D-Dev] [13] JDK-8219901: Noto
>> fonts for East Asian countries cannot belong to CompositeFont
>> Date: Tue, Apr 9, 2019 3:26 PM
>>
>> Hi,
>> (Ignore the previous mail received with less info)
>> Observations:
>> I went through different FontConfiguration & FontManager
>> implementations and I see that in case of
>> fontConfig(linux) only we are encoding/decoding
>> CompositeFonts in a unique way(In case of font config we
>> override get2DCompositeFontInfo()). For other platforms
>> we use parent get2DCompositeFontInfo() where we are
>> populating face names using
>> getFaceNameFromComponentFontName().
>> Also getDefaultPlatformFont() returns predetermined face
>> names in case of Windows and Mac.
>> For Linux changes made in FontConfiguration and
>> FontManager looks fine.
>> Thanks,
>> Jay
>>> On 04-Apr-2019, at 6:14 PM, Toshio 5 Nakamura
>>> <TOSHIONA at jp.ibm.com <mailto:TOSHIONA at jp.ibm.com>> wrote:
>>> Hi phil, Jay,
>>> Thank you for taking your time to review this patch.
>>> Thanks,
>>> Toshio Nakamura
>>>
>>> ----- Original message -----
>>> From: Jayathirth Rao <jayathirth.d.v at oracle.com
>>> <mailto:jayathirth.d.v at oracle.com>>
>>> To: TOSHIONA at jp.ibm.com <mailto:TOSHIONA at jp.ibm.com>
>>> Cc: 2d-dev <2d-dev at openjdk.java.net
>>> <mailto:2d-dev at openjdk.java.net>>
>>> Subject: Re: [OpenJDK 2D-Dev] [13] JDK-8219901: Noto
>>> fonts for East Asian countries cannot belong to
>>> CompositeFont
>>> Date: Thu, Apr 4, 2019 8:43 PM
>>>
>>> Hi,
>>> I am also taking a look at this.
>>> I will update my observations soon.
>>> Thanks,
>>> Jay
>>>> On 04-Apr-2019, at 8:23 AM, Philip Race
>>>> <philip.race at oracle.com
>>>> <mailto:philip.race at oracle.com>> wrote:
>>>> I will get back to this soon but you will still
>>>> need a 2nd reviewer.
>>>>
>>>> -phil.
>>>>
>>>> On 3/25/19, 12:29 AM, Toshio 5 Nakamura wrote:
>>>>> Hi Phil,
>>>>> Just a gentle reminder, I appreciate it if you
>>>>> have a time to look at this.
>>>>> Thanks,
>>>>> Toshio Nakamura
>>>>>
>>>>> ----- Original message -----
>>>>> From: "Toshio 5 Nakamura"
>>>>> <TOSHIONA at jp.ibm.com> <mailto:TOSHIONA at jp.ibm.com>
>>>>> Sent by: "2d-dev"
>>>>> <2d-dev-bounces at openjdk.java.net>
>>>>> <mailto:2d-dev-bounces at openjdk.java.net>
>>>>> To: Philip Race <philip.race at oracle.com>
>>>>> <mailto:philip.race at oracle.com>
>>>>> Cc: 2d-dev <2d-dev at openjdk.java.net>
>>>>> <mailto:2d-dev at openjdk.java.net>
>>>>> Subject: Re: [OpenJDK 2D-Dev] [13]
>>>>> JDK-8219901: Noto fonts for East Asian
>>>>> countries cannot belong to CompositeFont
>>>>> Date: Mon, Mar 11, 2019 9:58 PM
>>>>>
>>>>> Hi Phil,
>>>>>
>>>>> Thank you so much for your reviewing.
>>>>>
>>>>> Yes, "family" part can be removed with a few
>>>>> changes in
>>>>> "src/java.desktop/unix/classes/sun/awt/FcFontManager.java".
>>>>>
>>>>> The updated webrev is:
>>>>> http://cr.openjdk.java.net/~tnakamura/8219901/webrev.01
>>>>> <http://cr.openjdk.java.net/%7Etnakamura/8219901/webrev.01>/
>>>>>
>>>>> > So you don't need to clean everything -
>>>>> just your develop -internal
>>>>> > and -ea folders.
>>>>> Yes, thank you for the clarification.
>>>>>
>>>>> Thanks,
>>>>> Toshio Nakamura
>>>>>
>>>>> Philip Race <philip.race at oracle.com>
>>>>> <mailto:philip.race at oracle.com> wrote on
>>>>> 2019/03/10 18:05:18:
>>>>>
>>>>> > From: Philip Race <philip.race at oracle.com>
>>>>> <mailto:philip.race at oracle.com>
>>>>> > To: Toshio 5 Nakamura <TOSHIONA at jp.ibm.com>
>>>>> <mailto:TOSHIONA at jp.ibm.com>
>>>>> > Cc: 2d-dev <2d-dev at openjdk.java.net>
>>>>> <mailto:2d-dev at openjdk.java.net>
>>>>> > Date: 2019/03/10 18:05
>>>>> > Subject: Re: [OpenJDK 2D-Dev] [13]
>>>>> JDK-8219901: Noto fonts for East
>>>>> > Asian countries cannot belong to CompositeFont
>>>>> >
>>>>> > I can sponsor this but first :
>>>>> >
>>>>> > You seem to have made "family" redundant but
>>>>> aren't removing it.
>>>>> > There's no point in writing it out if
>>>>> nothing uses it on reading.
>>>>> > So we should remove it unless you can
>>>>> explain why you think it should be kept.
>>>>> >
>>>>> > I don't think this (removing it) is a
>>>>> problem for backports or
>>>>> > compatibility of the
>>>>> > format since release name is part of the
>>>>> file name where we write
>>>>> > the information,
>>>>> > and such a file name will necessarily be a
>>>>> consequence of a feature
>>>>> > or update release
>>>>> > containing this fix.
>>>>> >
>>>>> > Where it might be an issue is testing on
>>>>> 13-ea builds since they all report
>>>>> > that as the version string so for testing
>>>>> you may need to clean out your
>>>>> > ~/.java/fonts/13-ea folder. The same is for
>>>>> your 13-internal private builds.
>>>>> >
>>>>> > I think this is your point when you wrote :-
>>>>> >
>>>>> >> The cached font list is stored under
>>>>> ~/.java/fonts directory.
>>>>> >> We should delete it before applying the fix.
>>>>> >
>>>>> > So you don't need to clean everything -
>>>>> just your develop -internal
>>>>> > and -ea folders.
>>>>> >
>>>>> > Meanwhile I tested it .. and it seemed OK
>>>>> but I am still trying to join
>>>>> > up all the dots to make sure it is all
>>>>> correct code-wise.
>>>>> >
>>>>> > -phil
>>>>> >
>>>>> > On 2/28/19, 3:21 PM, Toshio 5 Nakamura wrote:
>>>>> > Hi,
>>>>> >
>>>>> > Could you review the fix and may I have a
>>>>> sponsor for it?
>>>>> >
>>>>> > Bug:
>>>>> https://bugs.openjdk.java.net/browse/JDK-8219901
>>>>> > Webrev:
>>>>> http://cr.openjdk.java.net/~tnakamura/8219901/webrev.00/
>>>>> <http://cr.openjdk.java.net/%7Etnakamura/8219901/webrev.00/>
>>>>> >
>>>>> > Issue:
>>>>> > Even if Google Noto fonts[1] were installed
>>>>> and listed by fontconfig library
>>>>> > on Linux, CompositeFont couldn't contain it.
>>>>> >
>>>>> > Fix description:
>>>>> >
>>>>> "src/java.desktop/share/classes/sun/font/CompositeFont.java"
>>>>> (l. 296)
>>>>> > validates the target font by comparing
>>>>> names. But, the current code
>>>>> > compared FamilyName with FullName
>>>>> (Font.getFontName()).
>>>>> > Then, Noto font was treated as invalid.
>>>>> >
>>>>> "src/java.desktop/unix/classes/sun/font/FcFontConfiguration.java"
>>>>> > should provide FullName.
>>>>> >
>>>>> > The cached font list is stored under
>>>>> ~/.java/fonts directory.
>>>>> > We should delete it before applying the fix.
>>>>> >
>>>>> > This fix is possible to change the default
>>>>> font, if CompositeFont
>>>>> > is used (especially under Ubuntu18.04 and
>>>>> East Asian settings).
>>>>> > But, I believe the fixed behavior is correct.
>>>>> >
>>>>> > [1] https://www.google.com/get/noto/
>>>>> >
>>>>> > Thanks,
>>>>> > Toshio Nakamura
>>>>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/2d-dev/attachments/20190602/2f3c56bf/attachment-0001.html>
More information about the 2d-dev
mailing list