[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] [13] JDK-8219901: Noto fonts for East Asian countries cannot belong to Composit
From:       "Toshio 5 Nakamura" <TOSHIONA () jp ! ibm ! com>
Date:       2019-05-20 12:20:53
Message-ID: OF1F78C86C.501D3165-ON00258400.00415662-00258400.0043D49E () notes ! na ! collabserv ! com
[Download RAW message or body]

<div class="socmaildefaultfont" dir="ltr" style="font-family:Arial, Helvetica, \
sans-serif;font-size:9pt" ><div dir="ltr" ><div>Hi phil,</div> <div>&nbsp;</div>
<div>Do you have chance to check this proposal again?</div>
<div>&nbsp;</div>
<div>To relieve your worry, I tested all locales additionally with<br>Ubuntu16.04, \
18.04, RHEL7, 8, and CentOS7. There&nbsp;were<br>many improvements.</div> \
<div>&nbsp;</div> <div>But, acutually, this testcase in the proposal detected \
two</div> <div>other issues. I believe the root causes are different, and</div>
<div>they can be treated separately. Details are in the bug DB.</div>
<div>&nbsp;</div>
<div>By the way, Noto CJK fonts v2.001 [1] seems to change<br>their fullname to the \
same one as familyname. So, this problem</div> <div>doesn't exist with the&nbsp;new \
version.</div> <div>&nbsp;</div>
<div>Anyway, since many distributions still use Noto CJK fonts v1.001,<br>I believe \
this proposal is still useful.</div> <div>&nbsp;</div>
<div>[1] <a href="https://github.com/googlefonts/noto-cjk">https://github.com/googlefonts/noto-cjk</a><br>JBS: \
<a href="https://bugs.openjdk.java.net/browse/JDK-8219901">https://bugs.openjdk.java.net/browse/JDK-8219901</a><br>Webrev.02: \
<a href="http://cr.openjdk.java.net/~tnakamura/8219901/webrev.02/">http://cr.openjdk.java.net/~tnakamura/8219901/webrev.02/</a></div>
 <div>&nbsp;</div>
<div>Thanks,<br>Toshio Nakamura</div></div>
<div dir="ltr" >&nbsp;</div>
<blockquote dir="ltr" style="border-left:solid #aaaaaa 2px; margin-left:5px; \
padding-left:5px; direction:ltr; margin-right:0px" >----- Original message \
-----<br>From: "Toshio 5 Nakamura" &lt;TOSHIONA@jp.ibm.com&gt;<br>Sent by: "2d-dev" \
&lt;2d-dev-bounces@openjdk.java.net&gt;<br>To: philip.race@oracle.com<br>Cc: \
2d-dev@openjdk.java.net<br>Subject: Re: [OpenJDK 2D-Dev] [13] JDK-8219901: Noto fonts \
for East Asian countries cannot belong to CompositeFont<br>Date: Tue, Apr 30, 2019 \
7:58 PM<br>&nbsp; <div dir="ltr" style="font-family:Arial, Helvetica, \
sans-serif;font-size:9pt" ><div dir="ltr" >Hi Phil,</div> <div dir="ltr" \
><div>&nbsp;</div> <div>Thank you so much for the review and pointing out.</div>
<div>&nbsp;</div>
<div>I updated the webrev to cover non-English results by testcase side.</div>
<div>&nbsp;</div>
<div>Additionally, I need another fix in \
FcFontConfiguration.java.<br>From&nbsp;internationalization view point, we need to \
tell zh_CN&nbsp;and zh_TW,<br>and fcinfo's file name requires not only language but \
also country.</div> <div>&nbsp;</div>
<div>I tested this with major locales under Ubuntu 16.04, 18.04, CentOS 7,<br>RHEL7 \
and 8beta.</div> <div>&nbsp;</div>
<div>Could you kindly review this again?<br><a \
href="http://cr.openjdk.java.net/~tnakamura/8219901/webrev.02/" \
target="_blank">http://cr.openjdk.java.net/~tnakamura/8219901/webrev.02/</a></div> \
<div>&nbsp;</div> <div>Thanks,<br>Toshio Nakamura</div></div>
<div dir="ltr" >&nbsp;</div>
<blockquote data-history-content-modified="1" dir="ltr" style="border-left:solid \
#aaaaaa 2px; margin-left:5px; padding-left:5px; direction:ltr; margin-right:0px" \
>----- Original message -----<br>From: Phil Race \
> &lt;philip.race@oracle.com&gt;<br>To: Toshio 5 Nakamura \
> &lt;TOSHIONA@jp.ibm.com&gt;, jayathirth.d.v@oracle.com<br>Cc: \
> 2d-dev@openjdk.java.net<br>Subject: Re: [OpenJDK 2D-Dev] [13] JDK-8219901: Noto \
> fonts for East Asian countries cannot belong to CompositeFont<br>Date: Fri, Apr 26, \
> 2019 7:26 AM<br>&nbsp;<br><!--Notes ACF
<meta http-equiv="Content-Type" content="text/html; charset=utf8" >--> The test fails \
for me when I set the Japanese locale. I am using Ubuntu 16.04.<br>Have you done any \
locale testing ?<br><br>env|grep \
LANG<br>LANG=ja_JP.UTF-8<br>GDM_LANG=ja_JP<br>LANGUAGE=ja_JP.UTF-8<br>&nbsp;$ \
~/jdk-client/build/linux-x86_64-server-release/jdk/bin/java \
FCCompositeTest<br>PF=Noto Sans Mono CJK JP Regular<br>FC=Noto Sans Mono CJK JP \
Regular<br>PF=TakaoPGothic<br>FC=Takao P????????????<br>java.lang.RuntimeException: \
FullName mismatch: TakaoPGothic,Takao P????????????<br>&nbsp;&nbsp;&nbsp; at \
FCCompositeTest.test(FCCompositeTest.java:92)<br>&nbsp;&nbsp;&nbsp; at \
FCCompositeTest.main(FCCompositeTest.java:52)<br>Exception in thread "main" \
java.lang.RuntimeException: Method invocation exception<br>&nbsp;&nbsp;&nbsp; at \
FCCompositeTest.test(FCCompositeTest.java:97)<br>&nbsp;&nbsp;&nbsp; at \
FCCompositeTest.main(FCCompositeTest.java:52)<br><br>-phil.<br>&nbsp; <div>On 4/23/19 \
3:14 AM, Toshio 5 Nakamura wrote:</div> <blockquote \
cite="mid:OF269623C6.FA612F0C-ON002583E5.0037F5F5-002583E5.00384C2B@notes.na.collabserv.com" \
type="cite" ><!--Notes ACF <meta http-equiv="content-type" content="text/html; \
charset=utf8" >--> <div dir="ltr" style="font-family:Arial, Helvetica, \
sans-serif;font-size:9pt" ><div dir="ltr" ><div>I apologize if my poor description \
caused confusion.</div> <div>&nbsp;</div>
<div>Hi Jay,<br>Thank you so much for your review.</div>
<div>&nbsp;</div>
<div>Hi phil,<br>I'm looking forward to hearing your results.<br>Noto font is \
expected to be used more widely, and I'm eager to fix this&nbsp;problem.<br>I welcome \
any suggestions or comments.</div> <div>&nbsp;</div>
<div>Thanks,<br>Toshio Nakamura</div></div>
<div dir="ltr" >&nbsp;</div>
<blockquote data-history-content-modified="1" dir="ltr" style="border-left:solid \
#aaaaaa 2px; margin-left:5px;          padding-left:5px; direction:ltr; \
margin-right:0px" >----- Original message -----<br>From: Jayathirth Rao <a \
href="mailto:jayathirth.d.v@oracle.com" \
target="_blank">&lt;jayathirth.d.v@oracle.com&gt;</a><br>To: Toshio 5 Nakamura <a \
href="mailto:TOSHIONA@jp.ibm.com" \
target="_blank">&lt;TOSHIONA@jp.ibm.com&gt;</a><br>Cc: Philip Race <a \
href="mailto:philip.race@oracle.com" \
target="_blank">&lt;philip.race@oracle.com&gt;</a>, <a \
href="mailto:2d-dev@openjdk.java.net" \
target="_blank">2d-dev@openjdk.java.net</a><br>Subject: Re: [OpenJDK 2D-Dev] [13] \
JDK-8219901: Noto fonts for East Asian countries cannot belong to \
CompositeFont<br>Date: Tue, Apr 9, 2019 3:26 PM<br>&nbsp;<br><!--Notes ACF <meta \
http-equiv="Content-Type" content="text/html; charset=utf8" >--> <div><font \
face="Default Monospace,Courier              New,Courier,monospace" size="2" ><span \
style="font-size: 9pt;                white-space: normal;" ><font face="Helvetica" \
>Hi,</font></span></font> <div style="font-size: 9pt; white-space: normal;" \
> >&nbsp;</div>
<div style="font-size: 9pt; white-space: normal;" ><font face="Default \
Monospace,Courier                New,Courier,monospace" size="2" ><font \
face="Helvetica" >(Ignore the previous mail received with less \
info)</font></font></div> <div style="font-size: 9pt; white-space: normal;" \
>&nbsp;</div> <div style="font-size: 9pt; white-space: normal;" ><font face="Default \
> Monospace,Courier                New,Courier,monospace" size="2" ><font \
> face="Helvetica" >Observations:</font></font></div>
<div><font face="Default Monospace,Courier                New,Courier,monospace" \
size="2" ><font face="Helvetica" ><span style="font-size: 9pt; white-space: normal;" \
>I went through different FontConfiguration &amp; FontManager implementations \
> and&nbsp;</span><span style="white-space: normal;" >I</span><span style="font-size: \
> 9pt; white-space: normal;" >&nbsp;see that in case of fontConfig(linux) only \
> we</span><span style="white-space: normal;" >&nbsp;are&nbsp;encoding/decoding \
> CompositeFonts in a unique way(In case of&nbsp;font config we \
> override&nbsp;</span></font><span style="font-family: Helvetica; white-space: \
> normal;" >get2DCompositeFontInfo()</span><span style="white-space: normal;" ><font \
> face="Helvetica" >). For other platforms we use </font><font face="Menlo" \
> >parent&nbsp;</font></span><span style="font-family: Helvetica; white-space: \
> > normal;" >get2DCompositeFontInfo() where we are populating face names \
> > using&nbsp;</span><font face="Menlo" ><span style="font-size: 9pt;" \
> > >getFaceNameFromComponentFontName().</span></font></font></div>
<div>&nbsp;</div>
<div><font face="Default Monospace,Courier                New,Courier,monospace" \
size="2" ><font face="Helvetica" ><span style="font-size: 9pt; white-space: normal;" \
>Also&nbsp;</span><span style="font-size: 9pt; white-space: normal;" \
> >getDefaultPlatformFont() returns predetermined face names in case of Windows and \
> > Mac.</span></font></font></div>
<div>&nbsp;</div>
<div><font face="Default Monospace,Courier                New,Courier,monospace" \
size="2" ><font face="Helvetica" >For Linux changes made in FontConfiguration and \
FontManager looks fine.</font></font></div> <div>&nbsp;</div>
<div><font face="Default Monospace,Courier                New,Courier,monospace" \
size="2" ><font face="Helvetica" >Thanks,</font></font></div> <div><font \
face="Default Monospace,Courier                New,Courier,monospace" size="2" ><font \
face="Helvetica" >Jay</font></font></div> <div>&nbsp;</div>
<div>&nbsp;</div></div>
<div><blockquote type="cite" ><div>On 04-Apr-2019, at 6:14 PM, Toshio 5 Nakamura \
&lt;<a href="mailto:TOSHIONA@jp.ibm.com" moz-do-not-send="true" \
target="_blank">TOSHIONA@jp.ibm.com</a>&gt; wrote:</div>&nbsp;

<div><div dir="ltr" style="font-family:Arial, Helvetica,                  \
sans-serif;font-size:9pt" ><div dir="ltr" >Hi phil, Jay,</div> <div dir="ltr" \
>&nbsp;</div> <div dir="ltr" >Thank you for taking your&nbsp;time to review this \
> patch.</div>
<div dir="ltr" >&nbsp;</div>
<div dir="ltr" >Thanks,</div>
<div dir="ltr" >Toshio Nakamura</div>
<blockquote data-history-content-modified="1" data-history-expanded="1" dir="ltr" \
style="border-left:solid #aaaaaa 2px;                    margin-left:5px; \
padding-left:5px; direction:ltr;                    margin-right:0px" >----- Original \
message -----<br>From: Jayathirth Rao &lt;<a href="mailto:jayathirth.d.v@oracle.com" \
moz-do-not-send="true" target="_blank">jayathirth.d.v@oracle.com</a>&gt;<br>To: <a \
href="mailto:TOSHIONA@jp.ibm.com" moz-do-not-send="true" \
target="_blank">TOSHIONA@jp.ibm.com</a><br>Cc: 2d-dev &lt;<a \
href="mailto:2d-dev@openjdk.java.net" moz-do-not-send="true" \
target="_blank">2d-dev@openjdk.java.net</a>&gt;<br>Subject: Re: [OpenJDK 2D-Dev] [13] \
JDK-8219901: Noto fonts for East Asian countries cannot belong to \
CompositeFont<br>Date: Thu, Apr 4, 2019 8:43 PM<br>&nbsp;<br><!--Notes ACF <meta \
http-equiv="Content-Type" content="text/html; charset=utf8" >-->Hi, <div>&nbsp;</div>
<div>I am also taking a look at this.</div>
<div>I will update my observations soon.</div>
<div>&nbsp;</div>
<div>Thanks,</div>
<div>Jay</div>
<div><div>&nbsp;
<blockquote type="cite" ><div>On 04-Apr-2019, at 8:23 AM, Philip Race &lt;<a \
href="mailto:philip.race@oracle.com" moz-do-not-send="true" \
target="_blank">philip.race@oracle.com</a>&gt; wrote:</div>&nbsp;

<div><!--Notes ACF
<meta content="text/html; charset=utf8" http-equiv="Content-Type" class="" >-->
<div bgcolor="#FFFFFF" text="#000000" >I will get back to this soon but you will \
still need a 2nd reviewer.<br><br>-phil.<br><br>On 3/25/19, 12:29 AM, Toshio 5 \
Nakamura wrote: <blockquote \
cite="mid:OF8B118B83.17979021-ON002583C8.00286DD1-002583C8.002930A9@notes.na.collabserv.com" \
type="cite" ><div dir="ltr" style="font-family:Arial,                                 \
Helvetica, sans-serif;font-size:9pt" ><div dir="ltr" >Hi Phil,</div> <div dir="ltr" \
>&nbsp;</div> <div dir="ltr" >Just a gentle reminder, I appreciate it if you have a \
> time to look at this.</div>
<div dir="ltr" >&nbsp;</div>
<div dir="ltr" >Thanks,</div>
<div dir="ltr" >Toshio Nakamura</div>
<div dir="ltr" >&nbsp;</div>
<blockquote data-history-content-modified="1" dir="ltr" style="border-left:solid      \
#aaaaaa 2px; margin-left:5px;                                    padding-left:5px; \
direction:ltr;                                    margin-right:0px" >----- Original \
message -----<br>From: "Toshio 5 Nakamura" <a href="mailto:TOSHIONA@jp.ibm.com" \
moz-do-not-send="true" target="_blank">&lt;TOSHIONA@jp.ibm.com&gt;</a><br>Sent by: \
"2d-dev" <a href="mailto:2d-dev-bounces@openjdk.java.net" moz-do-not-send="true" \
target="_blank">&lt;2d-dev-bounces@openjdk.java.net&gt;</a><br>To: Philip Race <a \
href="mailto:philip.race@oracle.com" moz-do-not-send="true" \
target="_blank">&lt;philip.race@oracle.com&gt;</a><br>Cc: 2d-dev <a \
href="mailto:2d-dev@openjdk.java.net" moz-do-not-send="true" \
target="_blank">&lt;2d-dev@openjdk.java.net&gt;</a><br>Subject: Re: [OpenJDK 2D-Dev] \
[13] JDK-8219901: Noto fonts for East Asian countries cannot belong to \
CompositeFont<br>Date: Mon, Mar 11, 2019 9:58 PM <p><font size="2" >Hi \
Phil,</font><br><br><font size="2" >Thank you so much for your \
reviewing.</font><br><br><font size="2" >Yes, "family" part can be removed with a few \
changes in</font><br><font size="2" \
>"src/java.desktop/unix/classes/sun/awt/FcFontManager.java".</font><br><br><font \
> size="2" >The updated webrev is:</font><br><font size="2" ><a \
> href="http://cr.openjdk.java.net/%7Etnakamura/8219901/webrev.01" \
> moz-do-not-send="true" \
> target="_blank">http://cr.openjdk.java.net/~tnakamura/8219901/webrev.01</a>/</font><br><br><tt><font \
> face="" size="3" >&gt; &nbsp;So you don't need to clean everything - just your \
> develop -internal<br>&gt; and -ea folders.</font></tt><br><font size="2" >Yes, \
> thank you for the clarification.</font><br><br><font size="2" \
> >Thanks,</font><br><font size="2" >Toshio Nakamura</font><br><br><tt><font face="" \
> > size="3" >Philip Race <a href="mailto:philip.race@oracle.com" \
> > moz-do-not-send="true" target="_blank">&lt;philip.race@oracle.com&gt;</a> wrote \
> > on 2019/03/10 18:05:18:<br><br>&gt; From: Philip Race <a \
> > href="mailto:philip.race@oracle.com" moz-do-not-send="true" \
> > target="_blank">&lt;philip.race@oracle.com&gt;</a></font></tt><br><tt><font \
> > face="" size="3" >&gt; To: Toshio 5 Nakamura <a href="mailto:TOSHIONA@jp.ibm.com" \
> > moz-do-not-send="true" \
> > target="_blank">&lt;TOSHIONA@jp.ibm.com&gt;</a></font></tt><br><tt><font face="" \
> > size="3" >&gt; Cc: 2d-dev <a href="mailto:2d-dev@openjdk.java.net" \
> > moz-do-not-send="true" \
> > target="_blank">&lt;2d-dev@openjdk.java.net&gt;</a></font></tt><br><tt><font \
> > face="" size="3" >&gt; Date: 2019/03/10 18:05</font></tt><br><tt><font face="" \
> > size="3" >&gt; Subject: Re: [OpenJDK 2D-Dev] [13] JDK-8219901: Noto fonts for \
> > East<br>&gt; Asian countries cannot belong to \
> > CompositeFont</font></tt><br><tt><font face="" size="3" >&gt;<br>&gt; I can \
> > sponsor this but first :<br>&gt;<br>&gt; You seem to have made "family" redundant \
> > but aren't removing it.<br>&gt; There's no point in writing it out if nothing \
> > uses it on reading.<br>&gt; So we should remove it unless you can explain why you \
> > think it should be kept.<br>&gt;<br>&gt; I don't think this (removing it) is a \
> > problem for backports or<br>&gt; compatibility of the<br>&gt; format since \
> > release name is part of the file name where we write<br>&gt; the \
> > information,<br>&gt; and such a file name will necessarily be a consequence of a \
> > feature<br>&gt; or update release<br>&gt; containing this fix.<br>&gt;<br>&gt; \
> > Where it might be an issue is testing on 13-ea builds since they all \
> > report<br>&gt; that as the version string so for testing you may need to clean \
> > out your<br>&gt; ~/.java/fonts/13-ea folder. The same is for your 13-internal \
> > private builds.<br>&gt;<br>&gt; I think this is your point when you wrote \
> > :-<br>&gt;<br>&gt;&gt; The cached font list is stored under ~/.java/fonts \
> > directory.<br>&gt;&gt; We should delete it before applying the \
> > fix.<br>&gt;<br>&gt; &nbsp;So you don't need to clean everything - just your \
> > develop -internal<br>&gt; and -ea folders.<br>&gt;<br>&gt; Meanwhile I tested it \
> > .. and it seemed OK but I am still trying to join<br>&gt; up all the dots to make \
> > sure it is all correct code-wise.<br>&gt;<br>&gt; -phil<br>&gt;<br>&gt; On \
> > 2/28/19, 3:21 PM, Toshio 5 Nakamura wrote: </font></tt><br><tt><font face="" \
> > size="3" >&gt; Hi,<br>&gt;<br>&gt; Could you review the fix and may I have a \
> > sponsor for it?<br>&gt;<br>&gt; Bug: <a \
> > href="https://bugs.openjdk.java.net/browse/JDK-8219901" moz-do-not-send="true" \
> > target="_blank">https://bugs.openjdk.java.net/browse/JDK-8219901</a><br>&gt; \
> > Webrev: <a href="http://cr.openjdk.java.net/%7Etnakamura/8219901/webrev.00/" \
> > moz-do-not-send="true" \
> > target="_blank">http://cr.openjdk.java.net/~tnakamura/8219901/webrev.00/</a><br>&gt;<br>&gt; \
> > Issue:<br>&gt; Even if Google Noto fonts[1] were installed and listed by \
> > fontconfig library<br>&gt; on Linux, CompositeFont couldn't contain \
> > it.<br>&gt;<br>&gt; Fix description:<br>&gt; \
> > "src/java.desktop/share/classes/sun/font/CompositeFont.java" (l. 296)<br>&gt; \
> > validates the target font by comparing names. But, the current code<br>&gt; \
> > compared FamilyName with FullName (Font.getFontName()).<br>&gt; Then, Noto font \
> > was treated as invalid.<br>&gt; \
> > "src/java.desktop/unix/classes/sun/font/FcFontConfiguration.java"<br>&gt; should \
> > provide FullName.<br>&gt;<br>&gt; The cached font list is stored under \
> > ~/.java/fonts directory.<br>&gt; We should delete it before applying the \
> > fix.<br>&gt;<br>&gt; This fix is possible to change the default font, if \
> > CompositeFont<br>&gt; is used (especially under Ubuntu18.04 and East Asian \
> > settings).<br>&gt; But, I believe the fixed behavior is correct.<br>&gt;<br>&gt; \
> > [1] <a href="https://www.google.com/get/noto/" moz-do-not-send="true" \
> > target="_blank">https://www.google.com/get/noto/</a><br>&gt;<br>&gt; \
> > Thanks,<br>&gt; Toshio Nakamura</font></tt></p></blockquote>
<div dir="ltr" >&nbsp;</div></div></blockquote></div></div></blockquote></div></div></blockquote>
 <div dir="ltr" >&nbsp;</div></div></div></blockquote></div></blockquote>
<div dir="ltr" >&nbsp;</div></div></blockquote></blockquote>
<div dir="ltr" >&nbsp;</div></div></blockquote>
<div dir="ltr" >&nbsp;</div></div><BR>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic