Discussion:
Setting the FreeType LCD filter
John Neffenger
2018-09-30 19:03:00 UTC
Permalink
I think I found the cause of the text rendering problem I have always
seen in JavaFX applications on Linux:

Reduce color fringes in FreeType subpixel rendering
https://github.com/javafxports/openjdk-jfx/issues/229

I'm finally seeing the fonts as they were intended! I used the Oracle
bug report outline as a template for the GitHub issue to make it easy to
copy to the Java Bug Database. Do I need a Java Bug ID before I submit a
pull request?

Thanks,
John

P.S.: For background information, there is a great demonstration of LCD
filtering algorithms by Felipe Heidrich at 1:02:47 into the video
"JavaFX Text Rendering"
The
link takes you directly to the two-minute segment showing the text
rendered by FreeType, first with no filter, and then with its various
filter options. (Note: the audio is a bit loud.)
Philip Race
2018-09-30 21:03:58 UTC
Permalink
Hi,

Your explanation makes sense.
Compile time linking is probably best so long as we can verify that
the function is available on all the platforms we need to build & run on
.. notably
older versions of OEL&RHEL.

Failing that, then as well as adding ".6" we should initialise

jint rc =-1;

instead of to zero .. so that failure to find the function isn't confused
as failure *of* the function, which in a nutshell, seems to be the bug here.
And I suppose we have the same bug on "older" systems where the freetype library is
found but lack the symbol.

Is there no JBS bug id already open on this ? If one was closed as not reproducible,
we can re-open it. Better than creating a new one.

-phil.
Post by John Neffenger
I think I found the cause of the text rendering problem I have always
Reduce color fringes in FreeType subpixel rendering
https://github.com/javafxports/openjdk-jfx/issues/229
I'm finally seeing the fonts as they were intended! I used the Oracle
bug report outline as a template for the GitHub issue to make it easy
to copy to the Java Bug Database. Do I need a Java Bug ID before I
submit a pull request?
Thanks,
John
P.S.: For background information, there is a great demonstration of
LCD filtering algorithms by Felipe Heidrich at 1:02:47 into the video
"JavaFX Text Rendering" http://youtu.be/LCrCni6EVek The
link takes you directly to the two-minute segment showing the text
rendered by FreeType, first with no filter, and then with its various
filter options. (Note: the audio is a bit loud.)
Phil Race
2018-10-01 19:28:37 UTC
Permalink
I think I can re-open https://bugs.openjdk.java.net/browse/JDK-8188810
The submitter there is comparing windows to Linux so there are many
things that are different, but the fringing in the Linux examples are
enough to make it possible that this was the real issue there.

-phil.
Post by Philip Race
Hi,
Your explanation makes sense.
Compile time linking is probably best so long as we can verify that
the function is available on all the platforms we need to build & run
on .. notably
older versions of OEL&RHEL.
Failing that, then as well as adding ".6" we should initialise
    jint rc =-1;
instead of to zero .. so that failure to find the function isn't confused
as failure *of* the function, which in a nutshell, seems to be the bug here.
And I suppose we have the same bug on "older" systems where the freetype library is
found but lack the symbol.
Is there no JBS bug id already open on this ? If one was closed as not reproducible,
we can re-open it. Better than creating a new one.
-phil.
Post by John Neffenger
I think I found the cause of the text rendering problem I have always
Reduce color fringes in FreeType subpixel rendering
https://github.com/javafxports/openjdk-jfx/issues/229
I'm finally seeing the fonts as they were intended! I used the Oracle
bug report outline as a template for the GitHub issue to make it easy
to copy to the Java Bug Database. Do I need a Java Bug ID before I
submit a pull request?
Thanks,
John
P.S.: For background information, there is a great demonstration of
LCD filtering algorithms by Felipe Heidrich at 1:02:47 into the video
"JavaFX Text Rendering" http://youtu.be/LCrCni6EVek The
link takes you directly to the two-minute segment showing the text
rendered by FreeType, first with no filter, and then with its various
filter options. (Note: the audio is a bit loud.)
Loading...