[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-2d-dev
Subject: Re: [OpenJDK 2D-Dev] Possible solution for font-rendering issues in Windows
From: Phil Race <philip.race () oracle ! com>
Date: 2019-05-14 15:58:33
Message-ID: 76e62e36-a5a2-d490-3135-75ce4f1cee28 () oracle ! com
[Download RAW message or body]
It was very deliberate that advances from the JDK's rasteriser was used
because many
applications were very sensitive to metrics. This was back in the T2K
days and it just
carried over to freetype. It worked out just fine with T2K but not so
much with freetype
I don't think I want to just take a patch which switches to GDI either,
so I wouldn't
bother preparing one. I need to take a big look at the whole picture
when I get time.
-phil
On 5/14/19 4:46 AM, Dmitry Batrak wrote:
> Hello,
>
> > I'm speculating here, but perhaps the issue is that glyphs are being
> positioned using Freetype while the actual glyph rendering is using
> GDI, and there is a disagreement between the two systems re: kerning?
> > The issue does seem to be limited to the kerning between glyphs and
> not the actual rendering of glyphs themselves.
>
> That's true. On Windows, LCD-antialiased glyphs are generated via GDI,
> but glyph advances are taken from FreeType. Rendering in newer
> FreeType seems to differ more from GDI rendering, so the result
> started looking worse. We've fixed this problem in JetBrains Runtime
> by keeping GDI-provided advances (for non-fractional-metrics case). If
> it's a sensible approach (I'm not sure I understand why advances from
> FreeType were used in the first place), I can prepare corresponding
> patch for inclusion in OpenJDK.
>
>
> On Mon, Apr 29, 2019 at 5:01 AM Peter Harvey <harvey@actenum.com
> <mailto:harvey@actenum.com>> wrote:
>
>
>
> On Sun, Apr 28, 2019 at 1:05 PM Phil Race <philip.race@oracle.com
> <mailto:philip.race@oracle.com>> wrote:
>
> One thing to add is that Swing on Windows will use LCD text in
> all cases I can think of and that is rendered by Windows/GDI
> not free type.
> Line and glyph spacing may still be affected (come from
> freetype) but not the glyph image itself.
> So it would have to be some custom rendering in another mode
> using 2D directly to get freetype glyph images in b&w or
> grayscale.
>
>
> I'm speculating here, but perhaps the issue is that glyphs are
> being positioned using Freetype while the actual glyph rendering
> is using GDI, and there is a disagreement between the two systems
> re: kerning? The issue does seem to be limited to the kerning
> between glyphs and not the actual rendering of glyphs themselves.
>
>
> On Apr 28, 2019, at 10:14 AM, Philip Race
> <philip.race@oracle.com <mailto:philip.race@oracle.com>> wrote:
>> On 4/28/19, 8:25 AM, Peter Harvey wrote:
>>> From what I can tell, Freetype 2.7 contained a change in
>>> hint processing that led to poorer quality font rendering on
>>> Windows. Any OpenJDK distribution using Freetype 2.7 or
>>> higher (ie. most distributions) will have poorer quality
>>> font rendering on Windows. I may have found a solution to
>>> this issue but I am unable to add comments to the relevant bugs:
>>>
>>> https://bugs.openjdk.java.net/browse/JDK-8217731
>>> https://bugs.openjdk.java.net/browse/JDK-8208377
>>> https://bugs.openjdk.java.net/browse/JDK-8214538
>>>
>>> As a temporary workaround, users of OpenJDK distributions
>>> can force pre-2.7 font rendering by simply setting an
>>> environment variable:
>>>
>>> FREETYPE_PROPERTIES=truetype:interpreter-version=35
>>>
>>> I've tested this workaround on OpenJDK distributions from
>>> Amazon, Oracle, and AdoptOpenJDK.
>>
>> Do you mean you specifically tested out exactly the issues &
>> scenarios
>> listed in the above bug reports and found them all 100%
>> reverted & cured ?
>> If not, please detail what exactly you see in each case when
>> applying the property vs previous JDKs.
>> What version of Windows did you test, and did you test
>> anything other than Windows ?
>
>
> I have only tested on Windows 10 Home 1803, with no font scaling
> enabled. My initial tests were performed using a desktop
> application, many OpenJDK distributions, and visually comparing
> the poor kerning when using Tahoma.
>
> I have now produced a screenshot using sample text and 12
> different OpenJDK distributions. I have highlighted the font
> kerning issues in a zoomed/cropped image:
> https://imgur.com/a/a9R0oBi
> https://imgur.com/a/BAZNJg6
>
> Each window in the above screenshot represents a different OpenJDK
> distribution running on my Windows environment with or without the
> FREETYPE_PROPERTIES environment variable specified:
>
> * the sample text is "Activity dwedwedwedwe" though kerning
> issues can be seen throughout most text within the dialog
> * the first JLabels use the default font, while the last three
> JLabels use 10pt, 11pt, and 12pt Tahoma
> * the left-side windows do not have FREETYPE_PROPERTIES specified
> * the right-side windows have FREETYPE_PROPERTIES specified
> * the first 8 OpenJDK distributions all show kerning issues
> which are fixed by setting FREETYPE_PROPERTIES
> * the last 4 OpenJDK distributions don't show kerning issues at
> all and are not affected by setting FREETYPE_PROPERTIES
>
> As shown in the screenshot, setting the FREETYPE_PROPERTIES
> environment variable appears to fix the kinds of kerning issues
> described in JDK-8217731 and JDK-8214538. I have not checked if it
> fixes the line spacing issue described in JDK-8217731, but I doubt
> it. JDK-8208377 looks to be unrelated and that is my mistake.
>
> If you need to replicate the test, the code is below:
>
> import javax.swing.BorderFactory;
> import javax.swing.BoxLayout;
> import javax.swing.JFrame;
> import javax.swing.JLabel;
> import javax.swing.JPanel;
> import java.awt.Font;
>
> public class TestSwingTexts {
> public static void main(String[] args) {
> JFrame frame = new JFrame();
>
> JPanel panel = new JPanel();
> panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
>
> System.out.println(System.getProperties());
>
> JLabel vendor = new JLabel(
> System.getProperty("java.vm.vendor") + " " +
> System.getProperty("java.runtime.version") + " "
> + (System.getenv("FREETYPE_PROPERTIES") == null ? "without
> fix" : "with fix"));
>
> JLabel label1 = new JLabel("Activity its dwedwedwedwe");
> JLabel label2 = new JLabel("Activity its dwedwedwedwe");
> JLabel label3 = new JLabel("Activity its dwedwedwedwe");
> JLabel label4 = new JLabel("Activity its dwedwedwedwe");
> label2.setFont(new Font("Tahoma", Font.PLAIN, 10));
> label3.setFont(new Font("Tahoma", Font.PLAIN, 11));
> label4.setFont(new Font("Tahoma", Font.PLAIN, 12));
>
> panel.add(vendor);
> panel.add(label1);
> panel.add(label2);
> panel.add(label3);
> panel.add(label4);
> panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
> frame.add(panel);
>
> frame.pack();
> frame.setLocationRelativeTo(null);
> frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
> frame.setVisible(true);
> }
> }
>
>
>>> Note that AdoptOpenJDK's distribution for Java 8 didn't
>>> require the workaround because it appears to be using
>>> Freetype 2.5.3. A quick Google for
>>> "truetype:interpreter-version=35" shows plenty of people in
>>> other open-source communities (eg. Wine, Fedora) which
>>> encourage this workaround for other software.
>>>
>>> A more permanent solution would be to change the default
>>> build process for OpenJDK to set
>>> "truetype:interpreter-version=35" as the default when
>>> compiling Freetype.
>>
>> I have read freetype notes on this and it isn't clear whether
>> we want to go against what it does by default.
>> And in any case, Oracle JDK switched from T2K to freetype in
>> 11 so there can be differences due to that too.
>>
>> It may be that Windows is the only platform on which this
>> reversion is a good idea.
>> And in any case, on Linux + Solaris (not sure about other
>> Unix-like distros) OpenJDK
>> currently uses the system freetype so a JDK build change for
>> freetype wouldn't help.
>
>
> After reading a little more, I would suggest keeping the latest
> Freetype but compiling it using truetype:interpreter-version=35 to
> fix the kerning issues.
>
> Regards,
> Peter.
>
>
>
> Best regards,
> Dmitry Batrak
[Attachment #3 (text/html)]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
It was very deliberate that advances from the JDK's rasteriser was
used because many<br>
applications were very sensitive to metrics. This was back in the
T2K days and it just<br>
carried over to freetype. It worked out just fine with T2K but not
so much with freetype<br>
<br>
I don't think I want to just take a patch which switches to GDI
either, so I wouldn't<br>
bother preparing one. I need to take a big look at the whole picture
when I get time.<br>
<br>
-phil<br>
<br>
<br>
<div class="moz-cite-prefix">On 5/14/19 4:46 AM, Dmitry Batrak
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAET5FPsNTKvmEOwN_p=iNbdCT7VHRpbC=vpepD9=pBgFzz1WQA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">
<div>Hello,</div>
<div><br>
</div>
<div>
<div>> I'm speculating here, but perhaps the issue is
that glyphs are being positioned using Freetype while the
actual glyph rendering is using GDI, and there is a
disagreement between the two systems re: kerning?</div>
<div>> The issue does seem to be limited to the kerning
between glyphs and not the actual rendering of glyphs
themselves.</div>
<div><br>
</div>
<div>That's true. On Windows, LCD-antialiased glyphs are
generated via GDI, but glyph advances are taken from
FreeType. Rendering in newer FreeType seems to differ more
from GDI rendering, so the result started looking worse.
We've fixed this problem in JetBrains Runtime by keeping
GDI-provided advances (for non-fractional-metrics case).
If it's a sensible approach (I'm not sure I understand why
advances from FreeType were used in the first place), I
can prepare corresponding patch for inclusion in OpenJDK.<br>
</div>
<div><br>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Apr 29, 2019 at 5:01
AM Peter Harvey <<a href="mailto:harvey@actenum.com"
moz-do-not-send="true">harvey@actenum.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On
Sun, Apr 28, 2019 at 1:05 PM
Phil Race <<a
href="mailto:philip.race@oracle.com"
target="_blank"
\
moz-do-not-send="true">philip.race@oracle.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div dir="auto">One thing to add
is that Swing on Windows will
use LCD text in all cases I
can think of and that is
rendered by Windows/GDI not
free type.
<div>Line and glyph spacing
may still be affected (come
from freetype) but not the
glyph image itself.</div>
<div>So it would have to be
some custom rendering in
another mode using 2D
directly to get freetype
glyph images in b&w or
grayscale.<br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>I'm speculating here, but
perhaps the issue is that glyphs
are being positioned using
Freetype while the actual glyph
rendering is using GDI, and
there is a disagreement between
the two systems re: kerning? The
issue does seem to be limited to
the kerning between glyphs and
not the actual rendering of
glyphs themselves.</div>
<div><br>
</div>
<div><br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div dir="auto">
<div dir="ltr">On Apr 28,
2019, at 10:14 AM, Philip
Race <<a
href="mailto:philip.race@oracle.com"
target="_blank"
\
moz-do-not-send="true">philip.race@oracle.com</a>> wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr"> On 4/28/19,
8:25 AM, Peter Harvey
wrote:
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>
<div>From what I
can tell,
Freetype 2.7
contained a
change in hint
processing
that led to
poorer quality
font rendering
on Windows.
Any OpenJDK
distribution
using Freetype
2.7 or higher
(ie. most
distributions)
will have
poorer quality
font rendering
on Windows. I
may have found
a solution to
this issue but
I am unable to
add comments
to the
relevant bugs:</div>
<div><br>
</div>
<div> <a
\
href="https://bugs.openjdk.java.net/browse/JDK-8217731" target="_blank" \
moz-do-not-send="true">https://bugs.openjdk.java.net/browse/JDK-8217731</a><br> \
</div> <div> <a
\
href="https://bugs.openjdk.java.net/browse/JDK-8208377" target="_blank" \
moz-do-not-send="true">https://bugs.openjdk.java.net/browse/JDK-8208377</a></div> \
<div> <a
\
href="https://bugs.openjdk.java.net/browse/JDK-8214538" target="_blank" \
moz-do-not-send="true">https://bugs.openjdk.java.net/browse/JDK-8214538</a><br> \
</div> <div> <br>
</div>
</div>
<div>As a
temporary
workaround,
users of OpenJDK
distributions
can force
pre-2.7 font
rendering by
simply setting
an environment
variable:<br>
</div>
<div><br>
</div>
<div>
\
FREETYPE_PROPERTIES=truetype:interpreter-version=35</div> <div><br>
</div>
<div>I've tested
this workaround
on OpenJDK
distributions
from Amazon,
Oracle, and
AdoptOpenJDK.</div>
</div>
</div>
</div>
</blockquote>
<br>
Do you mean you
specifically tested out
exactly the issues &
scenarios<br>
listed in the above bug
reports and found them all
100% reverted & cured
?<br>
If not, please detail what
exactly you see in each
case when applying the
property vs previous JDKs.<br>
What version of Windows
did you test, and did you
test anything other than
Windows ?<br>
</div>
</blockquote>
</div>
</blockquote>
<div><br>
</div>
<div>I have only tested on Windows
10 Home 1803, with no font
scaling enabled. My initial
tests were performed using a
desktop application, many
OpenJDK distributions, and
visually comparing the poor
kerning when using Tahoma.</div>
<div><br>
</div>
<div>I have now produced a
screenshot using sample text and
12 different OpenJDK
distributions. I have
highlighted the font kerning
issues in a zoomed/cropped
image:</div>
<div> <a
href="https://imgur.com/a/a9R0oBi"
target="_blank"
\
moz-do-not-send="true">https://imgur.com/a/a9R0oBi</a> </div> <div> <a
href="https://imgur.com/a/BAZNJg6"
target="_blank"
\
moz-do-not-send="true">https://imgur.com/a/BAZNJg6</a><br> </div>
<div><br>
</div>
<div>Each window in the above
screenshot represents a
different OpenJDK distribution
running on my Windows
environment with or without the
FREETYPE_PROPERTIES environment
variable specified:</div>
<div>
<ul>
<li>the sample text is
"Activity dwedwedwedwe"
though kerning issues can be
seen throughout most text
within the dialog</li>
<li>the first JLabels use the
default font, while the last
three JLabels use 10pt,
11pt, and 12pt Tahoma</li>
<li>the left-side windows do
not have FREETYPE_PROPERTIES
specified</li>
<li>the right-side windows
have FREETYPE_PROPERTIES
specified<br>
</li>
<li>the first 8 OpenJDK
distributions all show
kerning issues which are
fixed by setting
FREETYPE_PROPERTIES</li>
<li>the last 4 OpenJDK
distributions don't show
kerning issues at all and
are not affected by
setting FREETYPE_PROPERTIES</li>
</ul>
</div>
<div>
<div>As shown in the screenshot,
setting the
FREETYPE_PROPERTIES
environment variable appears
to fix the kinds of kerning
issues described in
JDK-8217731 and JDK-8214538. I
have not checked if it fixes
the line spacing issue
described in JDK-8217731, but
I doubt it. JDK-8208377 looks
to be unrelated and that is my
mistake.<br>
</div>
<div><br>
</div>
</div>
<div>If you need to replicate the
test, the code is below:<br>
</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<blockquote style="margin:0px 0px 0px 40px;border:medium
none;padding:0px">
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div>import
javax.swing.BorderFactory;</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div>import
javax.swing.BoxLayout;</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div>import
javax.swing.JFrame;</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div>import
javax.swing.JLabel;</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div>import
javax.swing.JPanel;</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div>import java.awt.Font;</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div>public class
TestSwingTexts {</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>public static void main(String[]
args) {</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>JFrame frame = new JFrame();</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>JPanel panel = new JPanel();</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>panel.setLayout(new BoxLayout(panel,
BoxLayout.Y_AXIS));</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>System.out.println(System.getProperties());</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>JLabel vendor = new JLabel(</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>System.getProperty("java.vm.vendor") + " " +
\
System.getProperty("java.runtime.version") + " "</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>+ (System.getenv("FREETYPE_PROPERTIES") == \
null ? "without fix" : "with fix"));</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>JLabel label1 = new
JLabel("Activity its
dwedwedwedwe");</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>JLabel label2 = new
JLabel("Activity its
dwedwedwedwe");</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>JLabel label3 = new
JLabel("Activity its
dwedwedwedwe");</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>JLabel label4 = new
JLabel("Activity its
dwedwedwedwe");</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>label2.setFont(new Font("Tahoma", Font.PLAIN,
10));</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>label3.setFont(new Font("Tahoma", Font.PLAIN,
11));</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>label4.setFont(new Font("Tahoma", Font.PLAIN,
12));</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>panel.add(vendor);</div> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>panel.add(label1);</div> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>panel.add(label2);</div> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>panel.add(label3);</div> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>panel.add(label4);</div> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>panel.setBorder(BorderFactory.createEmptyBorder(5,
5, 5, 5));</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>frame.add(panel);</div> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>frame.pack();</div> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>frame.setLocationRelativeTo(null);</div> \
</div> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>frame.setVisible(true);</div> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div><span \
style="white-space:pre-wrap"> </span>}</div> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_quote">
<div>
<div>}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div class="gmail_quote">
<div><br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div dir="auto">
<div>
<blockquote type="cite">
<div dir="ltr">
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div> Note that
AdoptOpenJDK's
distribution
for Java 8
didn't require
the workaround
because it
appears to be
using Freetype
2.5.3. A quick
Google for
\
"truetype:interpreter-version=35" shows plenty
of people in
other
open-source
communities
(eg. Wine,
Fedora) which
encourage this
workaround for
other
software.</div>
<div><br>
</div>
<div>A more
permanent
solution would
be to change
the default
build process
for OpenJDK to
set
\
"truetype:interpreter-version=35" as the default
when compiling
Freetype.</div>
</div>
</div>
</div>
</blockquote>
<br>
I have read freetype
notes on this and it
isn't clear whether we
want to go against what
it does by default.<br>
And in any case, Oracle
JDK switched from T2K to
freetype in 11 so there
can be differences due
to that too.<br>
<br>
It may be that Windows
is the only platform on
which this reversion is
a good idea.<br>
And in any case, on
Linux + Solaris (not
sure about other
Unix-like distros)
OpenJDK<br>
currently uses the
system freetype so a JDK
build change for
freetype wouldn't help.<br>
</div>
</blockquote>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>After reading a little more,
I would suggest keeping the
latest Freetype but compiling it
using truetype:interpreter-version=35 to fix the kerning issues.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Peter.</div>
</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<br>
<div>Best regards,</div>
<div>Dmitry Batrak<br>
</div>
</div>
</blockquote>
<br>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic