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

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] Font rendering quality in Linux
From:       Artur Rataj <arturrataj () gmail ! com>
Date:       2016-12-19 10:07:48
Message-ID: CACO3_sAs2sVXre+u=gApndbCof7SWCK+4-T+ZbHmkjK0S_-N2w () mail ! gmail ! com
[Download RAW message or body]

Alexey, I switched to your jdk and it works great for any GUI app I ran on
it. The difference is still there even if there are 2d transforms in use (I
have previously thought that Java2d starts to treat text like any other
shape in such a case).


On Sat, Dec 17, 2016 at 6:16 PM, Alexey Ushakov <
alexey.ushakov@jetbrains.com> wrote:

> Artur, we're going to submit our changes to OpenJDK after some
> refactoring. Actually, OpenJDK has some usages of FontConfig api and we'd
> like to merge them with ours.
>
> Best Regards,
> Alexey
>
> On 16 Dec 2016, at 20:09, Artur Rataj <arturrataj@gmail.com> wrote:
>
> Alexey, Android Studio in fact says "OpenJDK 64-bit server VM by JetBrains
> s.r.o."
>
> On JetBrains pages:
>
> Our custom JRE is based on OpenJDK and includes the most up to date fixes
> to provide better user experience on Linux (like font rendering
> improvements and HiDPI support).
>
>
>
> On Fri, Dec 16, 2016 at 10:31 AM, Alexey Ushakov <
> alexey.ushakov@jetbrains.com> wrote:
>
>> Hi Artur,
>>
>> So if it looks bad with that, it will look bad on your desktop unless the
>>> font is interpreted differently.
>>>
>>
>> Not true. The particular font, like a lot of the other (if you wish, I
>> may send you example images), is badly rendered only in Java. Other
>> Freetype apps render these fonts very well, thanks to the exceptional
>> quality of that library.
>>
>> If I run Netbeans with its standard fonts and --jdk-home of the Android
>> Studio jdk, the GUI quality is immediately improved, thanks to the fonts
>> rendered as expected from a properly supported Freetype.
>>
>>
>> Actually we (at JetBrains) have made some changes to use fontconfig hints
>> in freetype rendering.
>>
>> Best Regards,
>> Alexey
>>
>> On 16 Dec 2016, at 03:32, Artur Rataj <arturrataj@gmail.com> wrote:
>>
>>
>>
>> On Fri, Dec 16, 2016 at 12:54 AM, Phil Race <philip.race@oracle.com>
>> wrote:
>>
>>>
>>> As I started to say on that list, it seems to me that this may be a
>>> font-specific problem.
>>>
>> Fonts have hints. I've seen similar issues when the hints are poor.
>>>
>>
>>>
>> Unfortunately there is no easy way to know if they are poor.
>>>
>> Some clients/apps/rendering systems by policy ignore hints so they may
>>> look OK,
>>> but then they may not look as good on a case where the hints were good
>>> and important.
>>> If I knew exactly what font you were using I could look at it.
>>>
>>
>> The problem is more or less visible in a number of fonts, including the
>> standard ones used by Java in dialogs, and several very high quality fonts
>> supplied with Ubuntu. Of course, the actual differences vary with fonts.
>>
>> Also, the poor quality of font rendering of Java/Linux is known. This why
>> there are the patches, the alternative "fixed" versions of OpenJDK etc.
>>
>>
>>> Oracle's builds use a one that ships with the JDK binaries (not source)
>>> All openjdk builds use freetype. On Linux this means Ubuntu's openjdk
>>> will
>>> use the exact same copy of freetype as used for rendering the rest of
>>> your desktop!
>>>
>>
>> Thanks, so I was wrong. Then, it might be a misconfigured freetype, a
>> buggy interface to freetype or whatever.
>>
>>
>>> So if it looks bad with that, it will look bad on your desktop unless
>>> the font is interpreted differently.
>>>
>>
>> Not true. The particular font, like a lot of the other (if you wish, I
>> may send you example images), is badly rendered only in Java. Other
>> Freetype apps render these fonts very well, thanks to the exceptional
>> quality of that library.
>>
>> If I run Netbeans with its standard fonts and --jdk-home of the Android
>> Studio jdk, the GUI quality is immediately improved, thanks to the fonts
>> rendered as expected from a properly supported Freetype.
>>
>>
>>
>
>

[Attachment #3 (text/html)]

<div dir="ltr">Alexey,  I switched to your jdk and it works great for any GUI app I \
ran on it. The difference is still there even if there are 2d transforms in use (I \
have previously thought that Java2d starts to treat text like any other shape in such \
a case).<div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On \
Sat, Dec 17, 2016 at 6:16 PM, Alexey Ushakov <span dir="ltr">&lt;<a \
href="mailto:alexey.ushakov@jetbrains.com" \
target="_blank">alexey.ushakov@jetbrains.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div style="word-wrap:break-word">Artur, we're going to \
submit our changes to OpenJDK after some refactoring. Actually, OpenJDK has some \
usages of FontConfig api and we'd like to merge them with \
ours.<div><br></div><div>Best \
Regards,</div><div>Alexey</div><div><br><div><blockquote type="cite"><div>On 16 Dec \
2016, at 20:09, Artur Rataj &lt;<a href="mailto:arturrataj@gmail.com" \
target="_blank">arturrataj@gmail.com</a>&gt; wrote:</div><br \
class="m_9117001998232526184Apple-interchange-newline"><div><div dir="ltr">Alexey, \
Android Studio in fact says &quot;OpenJDK 64-bit server VM by JetBrains \
s.r.o.&quot;<div><br></div><div>On JetBrains pages:</div><br>Our custom JRE is based \
on OpenJDK and includes the most up to date fixes to provide better user experience \
on Linux (like font rendering improvements and HiDPI \
support).<div><br></div><div><br></div></div><div class="gmail_extra"><br><div \
class="gmail_quote">On Fri, Dec 16, 2016 at 10:31 AM, Alexey Ushakov <span \
dir="ltr">&lt;<a href="mailto:alexey.ushakov@jetbrains.com" \
target="_blank">alexey.ushakov@jetbrains.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div style="word-wrap:break-word">Hi \
Artur,<span><div><br></div><div><blockquote type="cite"><div dir="ltr"><div \
class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" \
style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div \
bgcolor="#FFFFFF">So if it looks bad with that, it will look bad on your desktop \
unless the font is interpreted \
differently.<br></div></blockquote><div><br></div><div>Not true. The particular font, \
like a lot of the other (if you wish, I may send you example images), is badly \
rendered only in Java. Other Freetype apps render these fonts very well, thanks to \
the exceptional quality of that library.</div><div><br></div><div>If I run Netbeans \
with its standard fonts and --jdk-home of the Android Studio jdk, the GUI quality is \
immediately improved, thanks to the fonts rendered as expected from a properly \
supported Freetype.</div></div></div></div></blockquote></div><div><div \
dir="ltr"><div class="gmail_extra"><div \
class="gmail_quote"><div><br></div></div></div></div></div></span><div>Actually we \
(at JetBrains) have made some changes to use fontconfig hints in freetype \
rendering.</div><div><br></div><div>Best Regards,</div><div>Alexey</div><div><div \
class="m_9117001998232526184h5"><div><br></div><div><div><blockquote \
type="cite"><div>On 16 Dec 2016, at 03:32, Artur Rataj &lt;<a \
href="mailto:arturrataj@gmail.com" target="_blank">arturrataj@gmail.com</a>&gt; \
wrote:</div><br class="m_9117001998232526184m_6429465744094363907Apple-interchange-newline"><div><div \
dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 16, \
2016 at 12:54 AM, Phil Race <span dir="ltr">&lt;<a \
href="mailto:philip.race@oracle.com" \
target="_blank">philip.race@oracle.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF"><br>
    As I started to say on that list, it seems to me that this may be a
    font-specific problem.<br></div></blockquote><blockquote class="gmail_quote" \
style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div \
bgcolor="#FFFFFF">Fonts have hints. I&#39;ve seen similar issues when the hints are \
poor.</div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div \
bgcolor="#FFFFFF">  </div></blockquote><blockquote class="gmail_quote" \
style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div \
bgcolor="#FFFFFF">  Unfortunately there is no easy way to know if they are \
poor.<br></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div \
bgcolor="#FFFFFF">Some clients/apps/rendering systems by policy ignore hints so they  \
may look OK,<br>  but then they may not look as good on a case where the hints were
    good and important.<br>
    If I knew exactly what font you were using I could look at \
it.<br></div></blockquote><div><br></div><div><div><div>The problem is more or less \
visible in a number of fonts, including the standard ones used by Java in dialogs, \
and several very high quality fonts supplied with Ubuntu. Of course, the actual \
differences vary with fonts.</div></div><div>  <br></div></div><div>Also, the poor \
quality of font rendering of Java/Linux is known. This why there are the patches, the \
alternative &quot;fixed&quot; versions of OpenJDK \
etc.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px \
0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div \
bgcolor="#FFFFFF"><br></div></blockquote><blockquote class="gmail_quote" \
style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div \
bgcolor="#FFFFFF">  Oracle&#39;s builds use a one that ships with the JDK binaries \
(not  source)<br>
    All openjdk builds use freetype. On Linux this means Ubuntu&#39;s
    openjdk will<br>
    use the exact same copy of freetype as used for rendering the rest
    of your desktop!<br></div></blockquote><div><br></div><div>Thanks, so I was \
wrong. Then, it might be a misconfigured freetype, a buggy interface to freetype or \
whatever.</div><div>  <br></div><blockquote class="gmail_quote" style="margin:0px 0px \
0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div \
bgcolor="#FFFFFF">  So if it looks bad with that, it will look bad on your desktop
    unless the font is interpreted \
differently.<br></div></blockquote><div><br></div><div>Not true. The particular font, \
like a lot of the other (if you wish, I may send you example images), is badly \
rendered only in Java. Other Freetype apps render these fonts very well, thanks to \
the exceptional quality of that library.</div><div><br></div><div>If I run Netbeans \
with its standard fonts and --jdk-home of the Android Studio jdk, the GUI quality is \
immediately improved, thanks to the fonts rendered as expected from a properly \
supported Freetype.</div><div><br></div></div></div></div> \
</div></blockquote></div><br></div></div></div></div></blockquote></div><br></div> \
</div></blockquote></div><br></div></div></blockquote></div><br></div>



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

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