ojdkbuild / ojdkbuild

Community builds using source code from OpenJDK project
GNU General Public License v2.0
2.57k stars 362 forks source link

Fonts not rendered "smooth" #80

Closed mandragor59 closed 5 years ago

mandragor59 commented 5 years ago

in "java-1.8.0-openjdk-1.8.0.212-1.b04" Windows-Release the Fonts are rendered terrible when starting an JNLP-File via webstart, same behavior in earlier releases.

ojdkbuild commented 5 years ago

Hi, I assume you are referring to the fonts rendering issue from this SO question.

I've done some experiments, and I cannot reproduce this on Win10 and Win2012 (fonts look fine), but I CAN reproduce it on Windows 7. Would you mind confirming whether you see it on Win7, or on newer version of Windows?

I currently don't understand what exact mechanism/setting is causing this (anti-aliasing, auto-hinting etc), but I found that it renders fine on Win7 with newer version of FreeType (the one used in AdoptOpenJDK builds).

mandragor59 commented 5 years ago

Hi, i definitely see it on Win7 and Win10 an it is reproduceable, especialy on caracters nearby with smal space between, like "WwmnX" its obviously seen. Minutes ago i've testet the same Version of OpenJDK (8u212) by azul (Zulu). This one works like a charm. But this distro has no openjfx and webstart implemented so i have to mix it with other third parties if i would decide to use it. And i will not be happy, if i must do this.

While we're at testing it, there seems to be an other problem with the IcedTea-Webstart in your 8u212 package. Some of our jnlp's can not be startet, because they initialize not correctly, in 8u201 they where starting perfectly. As a joke (i was shure it would not work) i start them with the 8u212 jvm an the 8u201 webstart-binaries and (surprise !) that works !!! Keep on working on it, i keep on testing ;-).

Mit freundlichen Grüßen / With kind regards

Andreas Lechte

Dear spies, members and minions of the Five Eyes Alliance, ladies and gentlemen! This e-mail has been sent from within the borders of the Federal Republic of Germany. This is a sovereign state. This sovereign state has strict laws for protecting the data and privacy of its citizens. Therefore it is strictly prohibited to record, store or digitally evaluate this e-mail message outside its destination. Please keep this in mind while you minding your business. Thank you very much. [#PRISM #noPRISM #tempora]

Original Message processed by david® Re: [ojdkbuild/ojdkbuild] Fonts not rendered "smooth" (#80) 26. April 2019, 14:35 Uhr Von ojdkbuild An ojdkbuild/ojdkbuild Cc (2) mandragor59|Author

Hi, I assume you are referring to the fonts rendering issue from this SO question. I've done some experiments, and I cannot reproduce this on Win10 and Win2012 (fonts look fine), but I CAN reproduce it on Windows 7. Would you mind confirming whether you see it on Win7, or on newer version of Windows? I currently don't understand what exact mechanism/setting is causing this (anti-aliasing, auto-hinting etc), but I found that it renders fine on Win7 with newer version of FreeType (the one used in AdoptOpenJDK builds). — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

ojdkbuild commented 5 years ago

i definitely see it on Win7 and Win10 an it is reproduceable, especialy on caracters nearby with smal space between, like "WwmnX" its obviously seen.

Thanks for confirmation, I will experiment with FreeType and update this issue.

On webstart problems with 8u212: there were 2 changes with webstart in this release that might cause this:

  1. IcedTea-Web was updated to version 1.8

  2. Startup options were moved to options file that can be changed locally

JNLP output is written into %LOCALAPPDATA%\ojdkbuild\java-1.8.0-openjdk-[version]\webstart\javaws_last_log.txt file, if you can share the details from that file for successful (older webstart) and failed (8u212) launches - that may be helfpuf.

davidvoit commented 5 years ago

Hi All,

I can reproduce this on an Windows Server 2016:

image

log file contents (looks ok to my eyes)

Starting Netx, command: ["C:/Program Files/ojdkbuild/java-1.8.0-openjdk-1.8.0.212-1/webstart/../bin/java.exe" -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+UseSerialGC -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -splash:"C:/Program Files/ojdkbuild/java-1.8.0-openjdk-1.8.0.212-1/webstart/javaws_splash.png" -Xbootclasspath/a:"C:/Program Files/ojdkbuild/java-1.8.0-openjdk-1.8.0.212-1/webstart/javaws.jar" -classpath "C:/Program Files/ojdkbuild/java-1.8.0-openjdk-1.8.0.212-1/webstart/../jre/lib/rt.jar" -Ditw.userdata="C:/Users/adminrbg.vd/AppData/Local/ojdkbuild/java-1.8.0-openjdk-1.8.0.212-1.b04.ojdkbuild.windows.x86_64/webstart/" -Dicedtea-web.bin.name=javaws.exe -Dicedtea-web.bin.location="C:/Program Files/ojdkbuild/java-1.8.0-openjdk-1.8.0.212-1/webstart/javaws.exe" net.sourceforge.jnlp.runtime.Boot -Xnofork -helpurl="https://github.com/ojdkbuild/ojdkbuild/wiki/WebStart" MY_JNLP_FILE_HERE] Unable to use Firefox's proxy settings. Using "DIRECT" as proxy type. Codebase matches codebase manifest attribute, and application is signed. Continuing. See: http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/security/no_redeploy.html for details. Starting application [APPLICATION_START_HERE] ... jnlp.log4j.configurationFile = http://SOME_LOG4J_FILE_HERE Program args[]: [...]

Thanks and Regards, David

ojdkbuild commented 5 years ago

Hi, on the fonts problem (problem with non-starting webstart is unrelated), it is caused by FreeType update to 2.8. In short, FreeType has 3 "rendering modes" - 35, 38 and 40. Newer FreeType defaults to 40 and it causes problems with JDK fonts rendering (references 1, 2, 3).

In 8u212 this "rendering mode" can be overridden with this environment variable (taken from here):

set FREETYPE_PROPERTIES=truetype:interpreter-version=35

For the following versions, I added a local patch defaulting "rendering mode" to 35. It also can be overridden (to 38 or 40) using the environment variable above.

mandragor59 commented 5 years ago

While we're at testing it, there seems to be an other problem with the IcedTea-Webstart in your 8u212 package. Some of our jnlp's can not be startet, because they initialize not correctly, in 8u201 they where starting perfectly.

I think Issue #84 describes it correctly.

mandragor59 commented 5 years ago

set FREETYPE_PROPERTIES=truetype:interpreter-version=35

That's it. !!

davidvoit commented 5 years ago

Hi,

I also can confirm that setting FREETYPE_PROPERTIES=truetype:interpreter-version=35 the fonts are much improved and for us now the same as on the oracle jre.

Thanks for the hint. If you need a pre release tested with your patch, than just inform me.

image

Thanks, David

ojdkbuild commented 5 years ago

Thanks for the confirmation! Patch merely sets interpreter-version=35 as a default, so if it works for you with environment variable - that should be enough.

Actually, Oracle Java 8 doesn't use FreeType (uses proprietary font rasterization lib). At least with this fix it renders the same as with other OpenJDK 8 builds that use older FreeType.

ojdkbuild commented 5 years ago

The fix is included with 8u222, 11.0.4 and 12.0.2. More elaborate version of the same fix is also added to upstream jdk. Closing the issue.