Oracle JDK vs. OpenJDK: font engine differences

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Oracle JDK vs. OpenJDK: font engine differences

Daniel Gredler
Hi all,

Mark Cavage (Oracle VP Java and Container Native Platform) said the
following last month during a JavaOne keynote [1]:

"There will be zero differences between the OpenJDK and the Oracle JDK."

A related blog post by Donald Smith (Oracle Sr. Director Product
Management) [2] says:

"[...] our intent is that within a few releases there should be no
technical differences between OpenJDK builds and Oracle JDK binaries."

I think that this is a great decision, but I haven't been able to find any
mention of how this affects the font engine within the JDK. It is my
understanding that one of the big differences between the Oracle JDK and
the OpenJDK is that the Oracle JDK uses the proprietary T2K font library
internally, while the OpenJDK uses FreeType [3]. Anecdotally, we are unable
to use OpenJDK for some of our applications that require precise font
measurement / layout, because rendering results are still inconsistent
across the two runtimes. Has this difference, and the steps necessary to
remedy it, been discussed on any public forums? I'd love to know more about
the way forward here.

Take care,

Daniel

[1] https://www.youtube.com/watch?v=Tf5rlIS6tkg
[2]
https://blogs.oracle.com/java-platform-group/faster-and-easier-use-and-redistribution-of-java-se
[3]
https://technfun.wordpress.com/2013/01/18/last-difference-openjdk-oracle-jdk/
Reply | Threaded
Open this post in threaded view
|

Re: Oracle JDK vs. OpenJDK: font engine differences

dalibor topic-2


On 14.11.2017 02:55, Daniel Gredler wrote:
> I'd love to know more about
> the way forward here.

Please see
http://mail.openjdk.java.net/pipermail/openjfx-dev/2017-October/020929.html

cheers,
dalibor topic

--
<http://www.oracle.com> Dalibor Topic | Principal Product Manager
Phone: +494089091214 <tel:+494089091214> | Mobile: +491737185961
<tel:+491737185961>

ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Hamburg

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher

<http://www.oracle.com/commitment> Oracle is committed to developing
practices and products that help protect the environment
Reply | Threaded
Open this post in threaded view
|

Re: Oracle JDK vs. OpenJDK: font engine differences

Volker Simonis
dalibor topic <[hidden email]> schrieb am Di. 14. Nov. 2017 um
09:44:

>
>
> On 14.11.2017 02:55, Daniel Gredler wrote:
> > I'd love to know more about
> > the way forward here.
>
> Please see
> http://mail.openjdk.java.net/pipermail/openjfx-dev/2017-October/020929.html
>

But that's about removinf T2K from JavaFX. The question was about the JDK.
To my knowledge, the Oracle JDK 9 still contains and uses T2K for font
rendering.


> cheers,
> dalibor topic
>
> --
> <http://www.oracle.com> Dalibor Topic | Principal Product Manager
> Phone: +494089091214 <tel:+494089091214> | Mobile: +491737185961
> <tel:+491737185961>
>
> ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Ham
> <https://maps.google.com/?q=G+%7C+K%C3%BChneh%C3%B6fe+5+%7C+22761+Ham&entry=gmail&source=g>
> burg
>
> ORACLE Deutschland B.V. & Co. KG
> Hauptverwaltung: Riesstr
> <https://maps.google.com/?q=ng:+Riesstr&entry=gmail&source=g>. 25,
> D-80992 München
> Registergericht: Amtsgericht München, HRA 95603
>
> Komplementärin: ORACLE Deutschland Verwaltung B.V.
> Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
> Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
> Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
>
> <http://www.oracle.com/commitment> Oracle is committed to developing
> practices and products that help protect the environment
>
Reply | Threaded
Open this post in threaded view
|

Re: Oracle JDK vs. OpenJDK: font engine differences

dalibor topic-2


On 14.11.2017 10:16, Volker Simonis wrote:

>
> dalibor topic <[hidden email]
> <mailto:[hidden email]>> schrieb am Di. 14. Nov. 2017 um 09:44:
>
>
>
>     On 14.11.2017 02:55, Daniel Gredler wrote:
>      > I'd love to know more about
>      > the way forward here.
>
>     Please see
>     http://mail.openjdk.java.net/pipermail/openjfx-dev/2017-October/020929.html
>
>
> But that's about removinf T2K from JavaFX. The question was about the
> JDK. To my knowledge, the Oracle JDK 9 still contains and uses T2K for
> font rendering.

As the link above shows, in JDK 10, it's being removed from JavaFX,
eliminating one aspect of the differences between Oracle JDK and OpenJDK
going forward.

As https://bugs.openjdk.java.net/browse/JDK-8093768 shows, freetype has
already been the default in Oracle JDK builds for embedded and desktop
Linux & OS X for a couple of years.

cheers,
dalibor topic
--
<http://www.oracle.com> Dalibor Topic | Principal Product Manager
Phone: +494089091214 <tel:+494089091214> | Mobile: +491737185961
<tel:+491737185961>

ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Hamburg

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher

<http://www.oracle.com/commitment> Oracle is committed to developing
practices and products that help protect the environment
Reply | Threaded
Open this post in threaded view
|

Re: Oracle JDK vs. OpenJDK: font engine differences

Mario Torre-6
On Tue, 2017-11-14 at 10:42 +0100, dalibor topic wrote:

>
> On 14.11.2017 10:16, Volker Simonis wrote:
> >
> > dalibor topic <[hidden email] 
> > <mailto:[hidden email]>> schrieb am Di. 14. Nov. 2017 um
> > 09:44:
> >
> >
> >
> >     On 14.11.2017 02:55, Daniel Gredler wrote:
> >      > I'd love to know more about
> >      > the way forward here.
> >
> >     Please see
> >     http://mail.openjdk.java.net/pipermail/openjfx-dev/2017-October
> > /020929.html
> >
> >
> > But that's about removinf T2K from JavaFX. The question was about
> > the 
> > JDK. To my knowledge, the Oracle JDK 9 still contains and uses T2K
> > for 
> > font rendering.
>
> As the link above shows, in JDK 10, it's being removed from JavaFX, 
> eliminating one aspect of the differences between Oracle JDK and
> OpenJDK 
> going forward.

I don't think this really answer the question though, JavaFX is not
part of OpenJDK 10. If anything this is another source of difference
because the Oracle JDK bundles JavaFX while OpenJDK doesn't. Just
adding the JavaFX binary to the GPL binary of OpenJDK doesn't really
work either, it may be, perhaps and at best, a temporary solution, but
we need to make sure that if the plan is to bundle JavaFX with OpenJDK,
this is done in a way that anyone can reproduce the full build with
standard tooling and no special hacks, at least on the officially
supported platforms.

> As https://bugs.openjdk.java.net/browse/JDK-8093768 shows, freetype
> has 
> already been the default in Oracle JDK builds for embedded and
> desktop 
> Linux & OS X for a couple of years.

This is also JavaFX, or am I misreading the bug report and target
components?

Cheers,
Mario

Reply | Threaded
Open this post in threaded view
|

Re: Oracle JDK vs. OpenJDK: font engine differences

dalibor topic-2


On 14.11.2017 13:56, Mario Torre wrote:

>> As https://bugs.openjdk.java.net/browse/JDK-8093768 shows, freetype
>> has
>> already been the default in Oracle JDK builds for embedded and
>> desktop
>> Linux & OS X for a couple of years.
>
> This is also JavaFX, or am I misreading the bug report and target
> components?

You're right, of course - sorry for the confusion.

cheers,
dalibor topic

--
<http://www.oracle.com> Dalibor Topic | Principal Product Manager
Phone: +494089091214 <tel:+494089091214> | Mobile: +491737185961
<tel:+491737185961>

ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Hamburg

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher

<http://www.oracle.com/commitment> Oracle is committed to developing
practices and products that help protect the environment
Reply | Threaded
Open this post in threaded view
|

Re: Oracle JDK vs. OpenJDK: font engine differences

Volker Simonis
Hi Dalibor,

the Oracle JDK 9 (downloaded from [1]) still contains the T2K font
renderer (at least on Linux and Windows):

$ ./jdk-9.0.1/bin/java -version
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

$ grep -ri T2KFontScaler jdk-9.0.1/
Binary file jdk-9.0.1/lib/libt2k.so matches
Binary file jdk-9.0.1/lib/modules matches
Binary file jdk-9.0.1/jmods/java.desktop.jmod matches

The reference implementation (both versions, the GPL licensed one as
well as the Oracle Binary Code licensed one, downloaded from [2])
definitely don't contain the T2K renderer:

$ ./java-se-9-ri-obcl/jdk-9/bin/java -version
openjdk version "9"
OpenJDK Runtime Environment (build 9+181)
OpenJDK 64-Bit Server VM (build 9+181, mixed mode)

$ grep -ri T2KFontScaler ./java-se-9-ri-obcl
Binary file ./java-se-9-ri-obcl/jdk-9/lib/modules matches

The corresponding switch for enabling T2K for non-OpenJDK builds is
still in the jdk10 [3] code base:

Class<? extends FontScaler> tmp = (Class<? extends FontScaler>)
    (FontUtilities.isOpenJDK ?
     Class.forName("sun.font.FreetypeFontScaler") :
     Class.forName("sun.font.T2KFontScaler"));

If you're aware of a JBS issue to remove it please post it here.

Another issue which many users of the current Oracle JDK are not aware
of is that the Oracle JDK contains a set of standard fonts which many
applications more or less "depend" on:

$ la jdk-9.0.1/lib/fonts/
total 2052
-rw-r--r--  1 simonis simonis   4041 Sep 28 05:51 fonts.dir
-rw-r--r--  1 simonis simonis  75144 Sep 28 05:51 LucidaBrightDemiBold.ttf
-rw-r--r--  1 simonis simonis  75124 Sep 28 05:51 LucidaBrightDemiItalic.ttf
-rw-r--r--  1 simonis simonis  80856 Sep 28 05:51 LucidaBrightItalic.ttf
-rw-r--r--  1 simonis simonis 344908 Sep 28 05:51 LucidaBrightRegular.ttf
-rw-r--r--  1 simonis simonis 317896 Sep 28 05:51 LucidaSansDemiBold.ttf
-rw-r--r--  1 simonis simonis 698236 Sep 28 05:51 LucidaSansRegular.ttf
-rw-r--r--  1 simonis simonis 234068 Sep 28 05:51 LucidaTypewriterBold.ttf
-rw-r--r--  1 simonis simonis 242700 Sep 28 05:51 LucidaTypewriterRegular.ttf

The OpenJDK binaries don't contain these fonts:

$ la ./java-se-9-ri-obcl/jdk-9/lib/fonts
ls: cannot access './java-se-9-ri-obcl/jdk-9/lib/fonts': No such file
or directory

This can be especially problematic on Linux where each distribution
has its own, potentially different set of standard fonts.

Are there any plans to open-source the aforementioned fonts such that
they can be added to the OpenJDK and be distributed along with it? Or
is it clear that the fonts currently shipped with the Oracle JDK will
never be included into the OpenJDK (e.g. because of licensing issues)?

Regards,
Volker

[1] http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html
[2] http://jdk.java.net/java-se-ri/9
[3] http://hg.openjdk.java.net/jdk/jdk/file/94f362b5f4dd/src/java.desktop/share/classes/sun/font/FontScaler.java

On Tue, Nov 14, 2017 at 2:08 PM, dalibor topic <[hidden email]> wrote:

>
>
> On 14.11.2017 13:56, Mario Torre wrote:
>
>>> As https://bugs.openjdk.java.net/browse/JDK-8093768 shows, freetype
>>> has
>>> already been the default in Oracle JDK builds for embedded and
>>> desktop
>>> Linux & OS X for a couple of years.
>>
>>
>> This is also JavaFX, or am I misreading the bug report and target
>> components?
>
>
> You're right, of course - sorry for the confusion.
>
>
> cheers,
> dalibor topic
>
> --
> <http://www.oracle.com> Dalibor Topic | Principal Product Manager
> Phone: +494089091214 <tel:+494089091214> | Mobile: +491737185961
> <tel:+491737185961>
>
> ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Hamburg
>
> ORACLE Deutschland B.V. & Co. KG
> Hauptverwaltung: Riesstr. 25, D-80992 München
> Registergericht: Amtsgericht München, HRA 95603
>
> Komplementärin: ORACLE Deutschland Verwaltung B.V.
> Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
> Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
> Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
>
> <http://www.oracle.com/commitment> Oracle is committed to developing
> practices and products that help protect the environment
Reply | Threaded
Open this post in threaded view
|

Re: Oracle JDK vs. OpenJDK: font engine differences

Phil Race
Hi Volker,

I don't think there is a claim anywhere  that JDK 10 EA "Oracle JDK"
binaries have
already migrated to be GPL binaries.

The migration from T2K to Freetype still has to take place and I expect
there
will be occasional rendering and measurement differences which will be
considered incompatibilities but it is inevitable and unavoidable.

It should be mitigated by the facts that Linux distros already use freetype
in their binaries so it should be no difference there, and on Mac. we mostly
use the Mac native coretext renderer, and on Windows we get LCD glyphs
(what most UIs use) from GDI as well.
Still there are plenty of cases where T2K is used for glyphs + metrics.

As to the Lucida fonts, like T2K, if we could have open sourced those we
would have done it in 2007 at the inception of OpenJDK. Whilst the license
was generous it was not that generous ..

I am sure that many apps - and many internal behaviours - were written
with an assumption they were there and we will definitely have to accept
that there will be consequences both in terms of changes we need to make
to internal JDK code and changes apps will need to make to adapt.
Those that have been tested on OpenJDK should have made those
adaptations long ago ..

Also although those are some of the most prominent pieces we can't open
source,
there are other more obscure ones. For example the ICC profile files in
Oracle JDK
were licensed from Kodak and can't be open sourced. We'll need to switch
those
to the open source ones, with minor consequences but only to the most colour
sensitive sophisticated apps ..

-phil

On 11/14/2017 07:06 AM, Volker Simonis wrote:

> Hi Dalibor,
>
> the Oracle JDK 9 (downloaded from [1]) still contains the T2K font
> renderer (at least on Linux and Windows):
>
> $ ./jdk-9.0.1/bin/java -version
> java version "9.0.1"
> Java(TM) SE Runtime Environment (build 9.0.1+11)
> Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
>
> $ grep -ri T2KFontScaler jdk-9.0.1/
> Binary file jdk-9.0.1/lib/libt2k.so matches
> Binary file jdk-9.0.1/lib/modules matches
> Binary file jdk-9.0.1/jmods/java.desktop.jmod matches
>
> The reference implementation (both versions, the GPL licensed one as
> well as the Oracle Binary Code licensed one, downloaded from [2])
> definitely don't contain the T2K renderer:
>
> $ ./java-se-9-ri-obcl/jdk-9/bin/java -version
> openjdk version "9"
> OpenJDK Runtime Environment (build 9+181)
> OpenJDK 64-Bit Server VM (build 9+181, mixed mode)
>
> $ grep -ri T2KFontScaler ./java-se-9-ri-obcl
> Binary file ./java-se-9-ri-obcl/jdk-9/lib/modules matches
>
> The corresponding switch for enabling T2K for non-OpenJDK builds is
> still in the jdk10 [3] code base:
>
> Class<? extends FontScaler> tmp = (Class<? extends FontScaler>)
>      (FontUtilities.isOpenJDK ?
>       Class.forName("sun.font.FreetypeFontScaler") :
>       Class.forName("sun.font.T2KFontScaler"));
>
> If you're aware of a JBS issue to remove it please post it here.
>
> Another issue which many users of the current Oracle JDK are not aware
> of is that the Oracle JDK contains a set of standard fonts which many
> applications more or less "depend" on:
>
> $ la jdk-9.0.1/lib/fonts/
> total 2052
> -rw-r--r--  1 simonis simonis   4041 Sep 28 05:51 fonts.dir
> -rw-r--r--  1 simonis simonis  75144 Sep 28 05:51 LucidaBrightDemiBold.ttf
> -rw-r--r--  1 simonis simonis  75124 Sep 28 05:51 LucidaBrightDemiItalic.ttf
> -rw-r--r--  1 simonis simonis  80856 Sep 28 05:51 LucidaBrightItalic.ttf
> -rw-r--r--  1 simonis simonis 344908 Sep 28 05:51 LucidaBrightRegular.ttf
> -rw-r--r--  1 simonis simonis 317896 Sep 28 05:51 LucidaSansDemiBold.ttf
> -rw-r--r--  1 simonis simonis 698236 Sep 28 05:51 LucidaSansRegular.ttf
> -rw-r--r--  1 simonis simonis 234068 Sep 28 05:51 LucidaTypewriterBold.ttf
> -rw-r--r--  1 simonis simonis 242700 Sep 28 05:51 LucidaTypewriterRegular.ttf
>
> The OpenJDK binaries don't contain these fonts:
>
> $ la ./java-se-9-ri-obcl/jdk-9/lib/fonts
> ls: cannot access './java-se-9-ri-obcl/jdk-9/lib/fonts': No such file
> or directory
>
> This can be especially problematic on Linux where each distribution
> has its own, potentially different set of standard fonts.
>
> Are there any plans to open-source the aforementioned fonts such that
> they can be added to the OpenJDK and be distributed along with it? Or
> is it clear that the fonts currently shipped with the Oracle JDK will
> never be included into the OpenJDK (e.g. because of licensing issues)?
>
> Regards,
> Volker
>
> [1] http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html
> [2] http://jdk.java.net/java-se-ri/9
> [3] http://hg.openjdk.java.net/jdk/jdk/file/94f362b5f4dd/src/java.desktop/share/classes/sun/font/FontScaler.java
>
> On Tue, Nov 14, 2017 at 2:08 PM, dalibor topic <[hidden email]> wrote:
>>
>> On 14.11.2017 13:56, Mario Torre wrote:
>>
>>>> As https://bugs.openjdk.java.net/browse/JDK-8093768 shows, freetype
>>>> has
>>>> already been the default in Oracle JDK builds for embedded and
>>>> desktop
>>>> Linux & OS X for a couple of years.
>>>
>>> This is also JavaFX, or am I misreading the bug report and target
>>> components?
>>
>> You're right, of course - sorry for the confusion.
>>
>>
>> cheers,
>> dalibor topic
>>
>> --
>> <http://www.oracle.com> Dalibor Topic | Principal Product Manager
>> Phone: +494089091214 <tel:+494089091214> | Mobile: +491737185961
>> <tel:+491737185961>
>>
>> ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Hamburg
>>
>> ORACLE Deutschland B.V. & Co. KG
>> Hauptverwaltung: Riesstr. 25, D-80992 München
>> Registergericht: Amtsgericht München, HRA 95603
>>
>> Komplementärin: ORACLE Deutschland Verwaltung B.V.
>> Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
>> Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
>> Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
>>
>> <http://www.oracle.com/commitment> Oracle is committed to developing
>> practices and products that help protect the environment

Reply | Threaded
Open this post in threaded view
|

Re: Oracle JDK vs. OpenJDK: font engine differences

Phil Race
In reply to this post by Mario Torre-6
> This is also JavaFX, or am I misreading the bug report and target components?

Right. Any reference you find anywhere to current shipping Oracle binaries using freetype
are limited entirely to OpenJFX where it uses the platform rasteriser and that HAPPENS
to be freetype on Linux
It does not ship or include freetype .. it just picks it up from the desktop environment ..
no different than any other platform API JDK might use.

T2K is not used by default anywhere in OpenJFX today.

It was still there for embedded use on some platforms that did not include freetype by
default and for Windows Vista (!) which did not include the needed DirectWrite libraries.
Those are now both legacy / unsupported and so T2K is already removed from OpenJFX (not OpenJDK) in 10.

-phil.




On 11/14/2017 04:56 AM, Mario Torre wrote:

> On Tue, 2017-11-14 at 10:42 +0100, dalibor topic wrote:
>> On 14.11.2017 10:16, Volker Simonis wrote:
>>> dalibor topic <[hidden email]
>>> <mailto:[hidden email]>> schrieb am Di. 14. Nov. 2017 um
>>> 09:44:
>>>
>>>
>>>
>>>      On 14.11.2017 02:55, Daniel Gredler wrote:
>>>       > I'd love to know more about
>>>       > the way forward here.
>>>
>>>      Please see
>>>      http://mail.openjdk.java.net/pipermail/openjfx-dev/2017-October
>>> /020929.html
>>>
>>>
>>> But that's about removinf T2K from JavaFX. The question was about
>>> the
>>> JDK. To my knowledge, the Oracle JDK 9 still contains and uses T2K
>>> for
>>> font rendering.
>> As the link above shows, in JDK 10, it's being removed from JavaFX,
>> eliminating one aspect of the differences between Oracle JDK and
>> OpenJDK
>> going forward.
> I don't think this really answer the question though, JavaFX is not
> part of OpenJDK 10. If anything this is another source of difference
> because the Oracle JDK bundles JavaFX while OpenJDK doesn't. Just
> adding the JavaFX binary to the GPL binary of OpenJDK doesn't really
> work either, it may be, perhaps and at best, a temporary solution, but
> we need to make sure that if the plan is to bundle JavaFX with OpenJDK,
> this is done in a way that anyone can reproduce the full build with
> standard tooling and no special hacks, at least on the officially
> supported platforms.
>
>> As https://bugs.openjdk.java.net/browse/JDK-8093768 shows, freetype
>> has
>> already been the default in Oracle JDK builds for embedded and
>> desktop
>> Linux & OS X for a couple of years.
> This is also JavaFX, or am I misreading the bug report and target
> components?
>
> Cheers,
> Mario
>

Reply | Threaded
Open this post in threaded view
|

Re: Oracle JDK vs. OpenJDK: font engine differences

Volker Simonis
In reply to this post by Phil Race
Hi Phil,

thanks for the clarifications.

On Tue, Nov 14, 2017 at 5:52 PM, Phil Race <[hidden email]> wrote:
> Hi Volker,
>
> I don't think there is a claim anywhere  that JDK 10 EA "Oracle JDK"
> binaries have
> already migrated to be GPL binaries.
>

I didn't asserted that there is such a claim. I just noticed that T2K
is still used in Oracle's JDK 10 binaries today and that I've seen no
discussion about removing it yet, because that was not clear from the
first answers on this thread.

> The migration from T2K to Freetype still has to take place and I expect
> there
> will be occasional rendering and measurement differences which will be
> considered incompatibilities but it is inevitable and unavoidable.
>
> It should be mitigated by the facts that Linux distros already use freetype
> in their binaries so it should be no difference there, and on Mac. we mostly
> use the Mac native coretext renderer, and on Windows we get LCD glyphs
> (what most UIs use) from GDI as well.
> Still there are plenty of cases where T2K is used for glyphs + metrics.
>

I know a lot of people who have switched back from OpenJDK to Oracle
JDK "because the fonts looked better". But thats mostly because of
Oracle JDK's integrated fonts, not because of the renderer. And that
may have changed with better font properties files and fonts in recent
Linux distributions.

> As to the Lucida fonts, like T2K, if we could have open sourced those we
> would have done it in 2007 at the inception of OpenJDK. Whilst the license
> was generous it was not that generous ..
>

That's a pity but we can not change that. Maybe it would be worth
while thinking about the inclusion of an open-source, high-quality,
Unicode-complete (well as much as possible :) font family into the
OpenJDK, such that we can get precise, cross-platform font rendering ?
I'm not a font expert, but it seems that there are quite some free
fonts available nowadays (e.g. Google Fonts, Ubuntu fonts) and maybe
we can even convince IBM to donate their WorldType font family now
that they've open sourced J9 :)

> I am sure that many apps - and many internal behaviours - were written
> with an assumption they were there and we will definitely have to accept
> that there will be consequences both in terms of changes we need to make
> to internal JDK code and changes apps will need to make to adapt.
> Those that have been tested on OpenJDK should have made those adaptations
> long ago ..
>
> Also although those are some of the most prominent pieces we can't open
> source,
> there are other more obscure ones. For example the ICC profile files in
> Oracle JDK
> were licensed from Kodak and can't be open sourced. We'll need to switch
> those
> to the open source ones, with minor consequences but only to the most colour
> sensitive sophisticated apps ..
>

Yes, I know but I agree that color profiles won't impact nearly as
many people as different font layout.

Regards,
Volker

> -phil
>
>
> On 11/14/2017 07:06 AM, Volker Simonis wrote:
>>
>> Hi Dalibor,
>>
>> the Oracle JDK 9 (downloaded from [1]) still contains the T2K font
>> renderer (at least on Linux and Windows):
>>
>> $ ./jdk-9.0.1/bin/java -version
>> java version "9.0.1"
>> Java(TM) SE Runtime Environment (build 9.0.1+11)
>> Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
>>
>> $ grep -ri T2KFontScaler jdk-9.0.1/
>> Binary file jdk-9.0.1/lib/libt2k.so matches
>> Binary file jdk-9.0.1/lib/modules matches
>> Binary file jdk-9.0.1/jmods/java.desktop.jmod matches
>>
>> The reference implementation (both versions, the GPL licensed one as
>> well as the Oracle Binary Code licensed one, downloaded from [2])
>> definitely don't contain the T2K renderer:
>>
>> $ ./java-se-9-ri-obcl/jdk-9/bin/java -version
>> openjdk version "9"
>> OpenJDK Runtime Environment (build 9+181)
>> OpenJDK 64-Bit Server VM (build 9+181, mixed mode)
>>
>> $ grep -ri T2KFontScaler ./java-se-9-ri-obcl
>> Binary file ./java-se-9-ri-obcl/jdk-9/lib/modules matches
>>
>> The corresponding switch for enabling T2K for non-OpenJDK builds is
>> still in the jdk10 [3] code base:
>>
>> Class<? extends FontScaler> tmp = (Class<? extends FontScaler>)
>>      (FontUtilities.isOpenJDK ?
>>       Class.forName("sun.font.FreetypeFontScaler") :
>>       Class.forName("sun.font.T2KFontScaler"));
>>
>> If you're aware of a JBS issue to remove it please post it here.
>>
>> Another issue which many users of the current Oracle JDK are not aware
>> of is that the Oracle JDK contains a set of standard fonts which many
>> applications more or less "depend" on:
>>
>> $ la jdk-9.0.1/lib/fonts/
>> total 2052
>> -rw-r--r--  1 simonis simonis   4041 Sep 28 05:51 fonts.dir
>> -rw-r--r--  1 simonis simonis  75144 Sep 28 05:51 LucidaBrightDemiBold.ttf
>> -rw-r--r--  1 simonis simonis  75124 Sep 28 05:51
>> LucidaBrightDemiItalic.ttf
>> -rw-r--r--  1 simonis simonis  80856 Sep 28 05:51 LucidaBrightItalic.ttf
>> -rw-r--r--  1 simonis simonis 344908 Sep 28 05:51 LucidaBrightRegular.ttf
>> -rw-r--r--  1 simonis simonis 317896 Sep 28 05:51 LucidaSansDemiBold.ttf
>> -rw-r--r--  1 simonis simonis 698236 Sep 28 05:51 LucidaSansRegular.ttf
>> -rw-r--r--  1 simonis simonis 234068 Sep 28 05:51 LucidaTypewriterBold.ttf
>> -rw-r--r--  1 simonis simonis 242700 Sep 28 05:51
>> LucidaTypewriterRegular.ttf
>>
>> The OpenJDK binaries don't contain these fonts:
>>
>> $ la ./java-se-9-ri-obcl/jdk-9/lib/fonts
>> ls: cannot access './java-se-9-ri-obcl/jdk-9/lib/fonts': No such file
>> or directory
>>
>> This can be especially problematic on Linux where each distribution
>> has its own, potentially different set of standard fonts.
>>
>> Are there any plans to open-source the aforementioned fonts such that
>> they can be added to the OpenJDK and be distributed along with it? Or
>> is it clear that the fonts currently shipped with the Oracle JDK will
>> never be included into the OpenJDK (e.g. because of licensing issues)?
>>
>> Regards,
>> Volker
>>
>> [1]
>> http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html
>> [2] http://jdk.java.net/java-se-ri/9
>> [3]
>> http://hg.openjdk.java.net/jdk/jdk/file/94f362b5f4dd/src/java.desktop/share/classes/sun/font/FontScaler.java
>>
>> On Tue, Nov 14, 2017 at 2:08 PM, dalibor topic <[hidden email]>
>> wrote:
>>>
>>>
>>> On 14.11.2017 13:56, Mario Torre wrote:
>>>
>>>>> As https://bugs.openjdk.java.net/browse/JDK-8093768 shows, freetype
>>>>> has
>>>>> already been the default in Oracle JDK builds for embedded and
>>>>> desktop
>>>>> Linux & OS X for a couple of years.
>>>>
>>>>
>>>> This is also JavaFX, or am I misreading the bug report and target
>>>> components?
>>>
>>>
>>> You're right, of course - sorry for the confusion.
>>>
>>>
>>> cheers,
>>> dalibor topic
>>>
>>> --
>>> <http://www.oracle.com> Dalibor Topic | Principal Product Manager
>>> Phone: +494089091214 <tel:+494089091214> | Mobile: +491737185961
>>> <tel:+491737185961>
>>>
>>> ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Hamburg
>>>
>>> ORACLE Deutschland B.V. & Co. KG
>>> Hauptverwaltung: Riesstr. 25, D-80992 München
>>> Registergericht: Amtsgericht München, HRA 95603
>>>
>>> Komplementärin: ORACLE Deutschland Verwaltung B.V.
>>> Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
>>> Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
>>> Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
>>>
>>> <http://www.oracle.com/commitment> Oracle is committed to developing
>>> practices and products that help protect the environment
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Oracle JDK vs. OpenJDK: font engine differences

Daniel Gredler
Hi *,

Thanks for all the information!

> The migration from T2K to Freetype still has to take place and I
> expect there will be occasional rendering and measurement
> differences which will be considered incompatibilities but it is
> inevitable and unavoidable.

Do you have any idea on the timeline? Even something as vague as
"definitely not in the next 12 months" would be helpful.

Is there a specific bug / feature / mailing list that I can watch to stay
up to date on this migration specifically?

> Maybe it would be worth while thinking about the inclusion of an
> open-source, high-quality, Unicode-complete (well as much as
> possible :) font family into the OpenJDK

Google Noto fonts are open source and collectively have very nice Unicode
coverage...

Not sure if they're considered high-quality, but some of them were designed
in collaboration with Adobe.

https://www.google.com/get/noto/

Take care,

Daniel



On Tue, Nov 14, 2017 at 12:18 PM, Volker Simonis <[hidden email]>
wrote:

> Hi Phil,
>
> thanks for the clarifications.
>
> On Tue, Nov 14, 2017 at 5:52 PM, Phil Race <[hidden email]> wrote:
> > Hi Volker,
> >
> > I don't think there is a claim anywhere  that JDK 10 EA "Oracle JDK"
> > binaries have
> > already migrated to be GPL binaries.
> >
>
> I didn't asserted that there is such a claim. I just noticed that T2K
> is still used in Oracle's JDK 10 binaries today and that I've seen no
> discussion about removing it yet, because that was not clear from the
> first answers on this thread.
>
> > The migration from T2K to Freetype still has to take place and I expect
> > there
> > will be occasional rendering and measurement differences which will be
> > considered incompatibilities but it is inevitable and unavoidable.
> >
> > It should be mitigated by the facts that Linux distros already use
> freetype
> > in their binaries so it should be no difference there, and on Mac. we
> mostly
> > use the Mac native coretext renderer, and on Windows we get LCD glyphs
> > (what most UIs use) from GDI as well.
> > Still there are plenty of cases where T2K is used for glyphs + metrics.
> >
>
> I know a lot of people who have switched back from OpenJDK to Oracle
> JDK "because the fonts looked better". But thats mostly because of
> Oracle JDK's integrated fonts, not because of the renderer. And that
> may have changed with better font properties files and fonts in recent
> Linux distributions.
>
> > As to the Lucida fonts, like T2K, if we could have open sourced those we
> > would have done it in 2007 at the inception of OpenJDK. Whilst the
> license
> > was generous it was not that generous ..
> >
>
> That's a pity but we can not change that. Maybe it would be worth
> while thinking about the inclusion of an open-source, high-quality,
> Unicode-complete (well as much as possible :) font family into the
> OpenJDK, such that we can get precise, cross-platform font rendering ?
> I'm not a font expert, but it seems that there are quite some free
> fonts available nowadays (e.g. Google Fonts, Ubuntu fonts) and maybe
> we can even convince IBM to donate their WorldType font family now
> that they've open sourced J9 :)
>
> > I am sure that many apps - and many internal behaviours - were written
> > with an assumption they were there and we will definitely have to accept
> > that there will be consequences both in terms of changes we need to make
> > to internal JDK code and changes apps will need to make to adapt.
> > Those that have been tested on OpenJDK should have made those adaptations
> > long ago ..
> >
> > Also although those are some of the most prominent pieces we can't open
> > source,
> > there are other more obscure ones. For example the ICC profile files in
> > Oracle JDK
> > were licensed from Kodak and can't be open sourced. We'll need to switch
> > those
> > to the open source ones, with minor consequences but only to the most
> colour
> > sensitive sophisticated apps ..
> >
>
> Yes, I know but I agree that color profiles won't impact nearly as
> many people as different font layout.
>
> Regards,
> Volker
>
> > -phil
> >
> >
> > On 11/14/2017 07:06 AM, Volker Simonis wrote:
> >>
> >> Hi Dalibor,
> >>
> >> the Oracle JDK 9 (downloaded from [1]) still contains the T2K font
> >> renderer (at least on Linux and Windows):
> >>
> >> $ ./jdk-9.0.1/bin/java -version
> >> java version "9.0.1"
> >> Java(TM) SE Runtime Environment (build 9.0.1+11)
> >> Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
> >>
> >> $ grep -ri T2KFontScaler jdk-9.0.1/
> >> Binary file jdk-9.0.1/lib/libt2k.so matches
> >> Binary file jdk-9.0.1/lib/modules matches
> >> Binary file jdk-9.0.1/jmods/java.desktop.jmod matches
> >>
> >> The reference implementation (both versions, the GPL licensed one as
> >> well as the Oracle Binary Code licensed one, downloaded from [2])
> >> definitely don't contain the T2K renderer:
> >>
> >> $ ./java-se-9-ri-obcl/jdk-9/bin/java -version
> >> openjdk version "9"
> >> OpenJDK Runtime Environment (build 9+181)
> >> OpenJDK 64-Bit Server VM (build 9+181, mixed mode)
> >>
> >> $ grep -ri T2KFontScaler ./java-se-9-ri-obcl
> >> Binary file ./java-se-9-ri-obcl/jdk-9/lib/modules matches
> >>
> >> The corresponding switch for enabling T2K for non-OpenJDK builds is
> >> still in the jdk10 [3] code base:
> >>
> >> Class<? extends FontScaler> tmp = (Class<? extends FontScaler>)
> >>      (FontUtilities.isOpenJDK ?
> >>       Class.forName("sun.font.FreetypeFontScaler") :
> >>       Class.forName("sun.font.T2KFontScaler"));
> >>
> >> If you're aware of a JBS issue to remove it please post it here.
> >>
> >> Another issue which many users of the current Oracle JDK are not aware
> >> of is that the Oracle JDK contains a set of standard fonts which many
> >> applications more or less "depend" on:
> >>
> >> $ la jdk-9.0.1/lib/fonts/
> >> total 2052
> >> -rw-r--r--  1 simonis simonis   4041 Sep 28 05:51 fonts.dir
> >> -rw-r--r--  1 simonis simonis  75144 Sep 28 05:51
> LucidaBrightDemiBold.ttf
> >> -rw-r--r--  1 simonis simonis  75124 Sep 28 05:51
> >> LucidaBrightDemiItalic.ttf
> >> -rw-r--r--  1 simonis simonis  80856 Sep 28 05:51 LucidaBrightItalic.ttf
> >> -rw-r--r--  1 simonis simonis 344908 Sep 28 05:51
> LucidaBrightRegular.ttf
> >> -rw-r--r--  1 simonis simonis 317896 Sep 28 05:51 LucidaSansDemiBold.ttf
> >> -rw-r--r--  1 simonis simonis 698236 Sep 28 05:51 LucidaSansRegular.ttf
> >> -rw-r--r--  1 simonis simonis 234068 Sep 28 05:51
> LucidaTypewriterBold.ttf
> >> -rw-r--r--  1 simonis simonis 242700 Sep 28 05:51
> >> LucidaTypewriterRegular.ttf
> >>
> >> The OpenJDK binaries don't contain these fonts:
> >>
> >> $ la ./java-se-9-ri-obcl/jdk-9/lib/fonts
> >> ls: cannot access './java-se-9-ri-obcl/jdk-9/lib/fonts': No such file
> >> or directory
> >>
> >> This can be especially problematic on Linux where each distribution
> >> has its own, potentially different set of standard fonts.
> >>
> >> Are there any plans to open-source the aforementioned fonts such that
> >> they can be added to the OpenJDK and be distributed along with it? Or
> >> is it clear that the fonts currently shipped with the Oracle JDK will
> >> never be included into the OpenJDK (e.g. because of licensing issues)?
> >>
> >> Regards,
> >> Volker
> >>
> >> [1]
> >> http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-
> 3848520.html
> >> [2] http://jdk.java.net/java-se-ri/9
> >> [3]
> >> http://hg.openjdk.java.net/jdk/jdk/file/94f362b5f4dd/src/
> java.desktop/share/classes/sun/font/FontScaler.java
> >>
> >> On Tue, Nov 14, 2017 at 2:08 PM, dalibor topic <
> [hidden email]>
> >> wrote:
> >>>
> >>>
> >>> On 14.11.2017 13:56, Mario Torre wrote:
> >>>
> >>>>> As https://bugs.openjdk.java.net/browse/JDK-8093768 shows, freetype
> >>>>> has
> >>>>> already been the default in Oracle JDK builds for embedded and
> >>>>> desktop
> >>>>> Linux & OS X for a couple of years.
> >>>>
> >>>>
> >>>> This is also JavaFX, or am I misreading the bug report and target
> >>>> components?
> >>>
> >>>
> >>> You're right, of course - sorry for the confusion.
> >>>
> >>>
> >>> cheers,
> >>> dalibor topic
> >>>
> >>> --
> >>> <http://www.oracle.com> Dalibor Topic | Principal Product Manager
> >>> Phone: +494089091214 <tel:+494089091214> | Mobile: +491737185961
> >>> <tel:+491737185961>
> >>>
> >>> ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Hamburg
> >>>
> >>> ORACLE Deutschland B.V. & Co. KG
> >>> Hauptverwaltung: Riesstr. 25, D-80992 München
> >>> Registergericht: Amtsgericht München, HRA 95603
> >>>
> >>> Komplementärin: ORACLE Deutschland Verwaltung B.V.
> >>> Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
> >>> Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
> >>> Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
> >>>
> >>> <http://www.oracle.com/commitment> Oracle is committed to developing
> >>> practices and products that help protect the environment
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Oracle JDK vs. OpenJDK: font engine differences

dalibor topic-2
In reply to this post by Volker Simonis


On 14.11.2017 16:06, Volker Simonis wrotE.
> If you're aware of a JBS issue to remove it please post it here.

Hi Volker,

Sorry for the confusion caused by my mixup, and thanks to Mario for
correcting it, and to Phil for providing the actual insights.

I don't think that there is a JBS issue that I can point to just yet for
the removal from the JDK.

cheers,
dalibor topic

--
<http://www.oracle.com> Dalibor Topic | Principal Product Manager
Phone: +494089091214 <tel:+494089091214> | Mobile: +491737185961
<tel:+491737185961>

ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Hamburg

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher

<http://www.oracle.com/commitment> Oracle is committed to developing
practices and products that help protect the environment
Reply | Threaded
Open this post in threaded view
|

Re: Oracle JDK vs. OpenJDK: font engine differences

Volker Simonis
On Wed, Nov 15, 2017 at 9:40 AM, dalibor topic <[hidden email]> wrote:

>
>
> On 14.11.2017 16:06, Volker Simonis wrotE.
>>
>> If you're aware of a JBS issue to remove it please post it here.
>
>
> Hi Volker,
>
> Sorry for the confusion caused by my mixup, and thanks to Mario for
> correcting it, and to Phil for providing the actual insights.
>

No problem. The topic is actually quite confusing :)

> I don't think that there is a JBS issue that I can point to just yet for the
> removal from the JDK.
>
>
> cheers,
> dalibor topic
>
> --
> <http://www.oracle.com> Dalibor Topic | Principal Product Manager
> Phone: +494089091214 <tel:+494089091214> | Mobile: +491737185961
> <tel:+491737185961>
>
> ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Hamburg
>
> ORACLE Deutschland B.V. & Co. KG
> Hauptverwaltung: Riesstr. 25, D-80992 München
> Registergericht: Amtsgericht München, HRA 95603
>
> Komplementärin: ORACLE Deutschland Verwaltung B.V.
> Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
> Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
> Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
>
> <http://www.oracle.com/commitment> Oracle is committed to developing
> practices and products that help protect the environment