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....@oracle.com>
    To: Toshio 5 Nakamura <toshi...@jp.ibm.com>
    Cc: Philip Race <philip.r...@oracle.com>, 2d-dev@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
    <toshi...@jp.ibm.com <mailto:toshi...@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....@oracle.com
        <mailto:jayathirth....@oracle.com>>
        To: toshi...@jp.ibm.com <mailto:toshi...@jp.ibm.com>
        Cc: 2d-dev <2d-dev@openjdk.java.net
        <mailto:2d-dev@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.r...@oracle.com <mailto:philip.r...@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" <toshi...@jp.ibm.com>
            <mailto:toshi...@jp.ibm.com>
            Sent by: "2d-dev" <2d-dev-boun...@openjdk.java.net>
            <mailto:2d-dev-boun...@openjdk.java.net>
            To: Philip Race <philip.r...@oracle.com>
            <mailto:philip.r...@oracle.com>
            Cc: 2d-dev <2d-dev@openjdk.java.net>
            <mailto:2d-dev@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.r...@oracle.com>
            <mailto:philip.r...@oracle.com> wrote on 2019/03/10
            18:05:18:

            > From: Philip Race <philip.r...@oracle.com>
            <mailto:philip.r...@oracle.com>
            > To: Toshio 5 Nakamura <toshi...@jp.ibm.com>
            <mailto:toshi...@jp.ibm.com>
            > Cc: 2d-dev <2d-dev@openjdk.java.net>
            <mailto:2d-dev@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



Reply via email to