Page 1 of 1

Zulu JDK

Posted: Wed Oct 16, 2019 7:41 am
by hunghung
https://www.azul.com/downloads/zulu-community/

Azul provide ready to install debian packages of both JDK or JRE, the FX versions included support for JavaFX only available in tar.gz format, though. The default OpenJDK packages of MX doesn't properly support font smoothing and antialiasing for Swing based applications. Azul's versions were already patched, it helps Swing applications very much. Please check if you could include it in MX Package Installer or at least, patch your own Java to do the same thing. Thanks.

Re: Zulu JDK

Posted: Wed Oct 16, 2019 9:44 pm
by Stevo
Do you know where these patches are available to the public?

Re: Zulu JDK

Posted: Thu Oct 17, 2019 12:50 am
by hunghung
Stevo wrote: Wed Oct 16, 2019 9:44 pm Do you know where these patches are available to the public?
I don't know. FreeBSD also patched their Java by default :happy:

Re: Zulu JDK

Posted: Thu Oct 31, 2019 12:57 pm
by hunghung
I don't know why but Zulu JDK suddenly lost their Java font smoothing after this new 1.8.0_232 version. Now it's no difference between the default openjdk and zulu jdk. This means the font is very ugly and sucks. I've no solution other than switching to GhostBSD where java font is still smooth. It's also agreed with my migrating plan to GhostBSD.

Re: Zulu JDK

Posted: Thu Oct 31, 2019 1:39 pm
by timkb4cq
I notice that although jdk & jre FX versions are listed in the pulldown menu in the Azul Download page, they are not actually available to download for any OS/Java version. Only the standard jdk & jre versions which they also offer in an apt-get repository.

Re: Zulu JDK

Posted: Thu Oct 31, 2019 2:18 pm
by hunghung
timkb4cq wrote: Thu Oct 31, 2019 1:39 pm I notice that although jdk & jre FX versions are listed in the pulldown menu in the Azul Download page, they are not actually available to download for any OS/Java version. Only the standard jdk & jre versions which they also offer in an apt-get repository.
I also noticed the same thing. They no longer offer the FX versions for download, even before that these versions only available as .tar.gz archives but not deb or rpm packages. The only thing keep me using their java is font smoothing. Now it's faded away so I've no reason to continue to use it.

Re: Zulu JDK

Posted: Sat Nov 02, 2019 7:53 am
by baldyeti
Hello, I am currently using build 1.8.0_181-b02 from Azul. I'd like to refresh my version but have questions for you:

@OP: how does one check whether font smoothing is included ? With build 181, eclipse and oracle sqldeveloper look perfectly readable to me. Which is the last Zulu JDK known to include it ?

@timkb4cq : if you tick the "Older Zulu versions" on the download form, JDK with FX becomes available for build 222 (so not the latest 232 indeed). I have only tried tar.gz, not deb.

Re: Zulu JDK

Posted: Sat Nov 02, 2019 8:29 am
by hunghung
baldyeti wrote: Sat Nov 02, 2019 7:53 am Hello, I am currently using build 1.8.0_181-b02 from Azul. I'd like to refresh my version but have questions for you:

@OP: how does one check whether font smoothing is included ? With build 181, eclipse and oracle sqldeveloper look perfectly readable to me. Which is the last Zulu JDK known to include it ?

@timkb4cq : if you tick the "Older Zulu versions" on the download form, JDK with FX becomes available for build 222 (so not the latest 232 indeed). I have only tried tar.gz, not deb.
Just download a swing based app, check if the font is smooth or not. I usually use pixelitor because it's small and I'll use it anyway ;)

The last Zulu 8 version with properly font smoothing is 222.

It's not Azul's fault. OpenJDK 8 build 232 completely broken font smoothing. When I posted this thread I've not tested on GhostBSD, now I can confirm it's broken everywhere :frown:

Re: Zulu JDK

Posted: Sat Nov 02, 2019 9:39 am
by baldyeti
Thanks hunghung, hopefully this is a temporary glitch, not some restriction Oracle introduced to features OpenbJDK can bundle.

PS: I installed build 232 from AdoptOpenJDK and fonts look alright to me (on MX18/stretch)

PS2: MX-forum again awfully slow I am sorry to report

Re: Zulu JDK

Posted: Sat Nov 02, 2019 6:32 pm
by timkb4cq
Java FXPorts reported that installing libfreetype6-dev fixes the font smoothing. Have you tried that?

Re: Zulu JDK

Posted: Mon Nov 04, 2019 4:39 am
by hunghung
timkb4cq wrote: Sat Nov 02, 2019 6:32 pm Java FXPorts reported that installing libfreetype6-dev fixes the font smoothing. Have you tried that?
Hi. I've tried but it didn't work :rolleyes:

Re: Zulu JDK

Posted: Mon Nov 04, 2019 4:51 am
by hunghung
baldyeti wrote: Sat Nov 02, 2019 9:39 am Thanks hunghung, hopefully this is a temporary glitch, not some restriction Oracle introduced to features OpenbJDK can bundle.

PS: I installed build 232 from AdoptOpenJDK and fonts look alright to me (on MX18/stretch)

PS2: MX-forum again awfully slow I am sorry to report
Unfortunately I don't think so. I advised you to download Pixelitor and go to Help/About/System Info you will noticed that with Java 8 build 222 and previous builds, Java vendor is not locked, with Zulu 8 it's Azul Systems or something like that, but with Java 8 build 232 it's all changed to Oracle. As soon as you upgrade to Java 8 build 232 on any platforms the font smoothing is broken :rolleyes:

Re: Zulu JDK

Posted: Mon Nov 04, 2019 11:55 am
by timkb4cq
Found a workaround! I think you'll want to export this FREETYPE_PROPERTIES=truetype:interpreter-version=35 setting in /etc/environment once you see the results here

FREETYPE_PROPERTIES=truetype:interpreter-version=35 java -jar <path-to>/Pixelitor-4.2.2.jar

Re: Zulu JDK

Posted: Mon Nov 04, 2019 12:48 pm
by hunghung
timkb4cq wrote: Mon Nov 04, 2019 11:55 am Found a workaround! I think you'll want to export this FREETYPE_PROPERTIES=truetype:interpreter-version=35 setting in /etc/environment once you see the results here

FREETYPE_PROPERTIES=truetype:interpreter-version=35 java -jar <path-to>/Pixelitor-4.2.2.jar
Could you show me a screenshot? I've tried but it didn't work :frown:

Re: Zulu JDK

Posted: Mon Nov 04, 2019 12:55 pm
by baldyeti
@hunghung: I am using the build 1.8.0_232-b09 from AdoptOpenJDK and the fonts look normal to me, including with your test app (see attachment)

Note i am on MX18/stretch, are you using MX19/buster ? It might have different FreeType libraries that make the work-around suggested by tim necessary.

Re: Zulu JDK

Posted: Mon Nov 04, 2019 1:07 pm
by hunghung
baldyeti wrote: Mon Nov 04, 2019 12:55 pm @hunghung: I am using the build 1.8.0_232-b09 from AdoptOpenJDK and the fonts look normal to me, including with your test app (see attachment)

Image
Note i am on MX18/stretch, are you using MX19/buster ? It might have different FreeType libraries that make the work-around suggested by tim is necessary.
I'm using MX-18.3 like you. AdoptOpenJDK was said to be not affected since it links with an older FreeType version.

p/s: Oh, almost forgot. When I report to timkb4cq I use MX's stock Java. I've so many Java installed on my system now so it's really confusing.

Re: Zulu JDK

Posted: Mon Nov 04, 2019 1:09 pm
by timkb4cq
The workaround works on MX-19 using either the installed openjdk-11 or openjdk-8 from the standard repositories. No need to go to outside Java builds

Without workaround:
Screenshot-26.png
With Workaround:
Screenshot-25.png

Re: Zulu JDK

Posted: Mon Nov 04, 2019 1:22 pm
by baldyeti
Must be my aging eyes - i can barely see any difference ?!? Would you say my screenshot has a font smoothing issue, too ? I have seen much worse with java and swing !

Anyway i only use an external JDK because i multi-boot and don't want every distro installed to regularly update big packages like java/firefox/libreoffice.

For regular users i do not think it is reasonable to ask MX to package every JDK under the sun as requested by hunghung in another thread. That can only lead to confusion. OpenJDK is what debian and most distros endorse, and a perfectly sane default IMO. If a given release behaves better with a temporary work-around, this here forum is the place to share the hint.

Re: Zulu JDK

Posted: Mon Nov 04, 2019 1:27 pm
by timkb4cq
Your snapshot looks fine.

Open the the first snapshot I posted in a new tab & zoom in with <ctrl>+ or <ctrl>mousewheel
You will see letters with cyan & purple color fringing not seen while using the workaround, or with the version of Java you have installed.
Screenshot-27.png

Re: Zulu JDK

Posted: Mon Nov 04, 2019 1:41 pm
by hunghung
Sorry everyone, I forgot to turn off my image blocker extension so I didn't see your screenshot.

Here are my screenshots using Zulu JDK.

You could clearly see the different with yours.

Notice: Screenshot3: Do you even recognize it's a Java Swing App? ;)

That's the reason why I recommend this Zulu JDK over MX's stock JDK. Sadly, the latest Zulu JDK version also broke font smoothing.

Grab the .deb here and install it, you will know how awesome it is: https://cdn.azul.com/zulu/bin/zulu8.40. ... _amd64.deb

p/s: the openjdk8 build 222 on FreeBSD also has the same quality of font smoothing.

Re: Zulu JDK

Posted: Mon Nov 04, 2019 2:07 pm
by baldyeti
@tim: tx, when zooming in i can see the difference

@hunghung: for the changes to /etc/environment to take effect you may have to logout/login, the easiest quick test is from the command line:

Code: Select all

FREETYPE_PROPERTIES=truetype:interpreter-version=35 java -jar Pixelitor-4.2.1.jar

Re: Zulu JDK

Posted: Mon Nov 04, 2019 2:38 pm
by hunghung
baldyeti wrote: Mon Nov 04, 2019 2:07 pm@hunghung: for the changes to /etc/environment to take effect you may have to logout/login, the easiest quick test is from the command line:

Code: Select all

FREETYPE_PROPERTIES=truetype:interpreter-version=35 java -jar Pixelitor-4.2.1.jar
I tested from the command line and it didn't work :rolleyes:

Re: Zulu JDK

Posted: Tue Nov 05, 2019 1:08 am
by hunghung
This is the screenshot of Pixelitor on an old DragonFlyBSD box, not updated to latest openjdk build. I posted it here for you to know how good patched Java font smoothing could be.

I'm just a normal user. I wish I could point exactly where the patches were to stop this time consuming process of trial and error. If we could patch our own Java, there's no need to import an external implementation :happy:

Re: Zulu JDK

Posted: Tue Nov 05, 2019 3:56 am
by hunghung
The last version with proper font smoothing of both Zulu JDK and AdoptOpenJDK is build 222. We should just stick to this version while waiting for upstream to resolve this problem, as with build 232 font smoothing has been broken everywhere. Please consider adding them in addition to the MX's stock Java as my requestion here: viewtopic.php?f=55&t=53835