JavaFX 2.1 Beta: Improved Font Rendering

14

In the current JavaFX 2.1 Beta preview (Build 12), the font rendering on LCD screens improved a lot due to sub-pixel font anti-aliasing. Here are 2 screen shots from my Eclipse 4 JavaFX rendering demo:

JavaFX 2.0.2 (without sub-pixel font anti-aliasing):

JavaFX 2.1 Beta Build 12 (with sub-pixel font anti-aliasing):

I really like this improvement!

Kai

You find me on Twitter and Google+.
Next Eclipse RCP 3.x/4.x trainings in Munich

14 Comments

  1. Wolfgang
    Wolfgang02-14-2012

    Great! Day to day JavaFX becomes more and more interesting to me. I understood the concept of your JavaFX based workbench renderer. Very interesting approach that could be an alternative if writing e4 applications from scratch. What about existing SWT based code. Are there any plans or even already existing projects for a JavaFX based SWT implementaion? (I mean the same solution the compeople guys did with QT or something like SwingWT)

    Keep going on with JavaFX …

  2. vini
    vini02-14-2012

    Is Java Fx 2.1 prelinked in eclipse 4x.. I can’t link it with netbeans 7.1

  3. Kai Tödter
    Kai Tödter02-14-2012

    @Wolfgang

    there are no plans to implement the SWT API with JavaFX. So there would be no reuse with existing SWT code. But Using a good JavaFX render for the Eclipse 4 application model would be a good starting point for Eclipse 4/JavaFX based applications.

  4. Kai Tödter
    Kai Tödter02-14-2012

    @vini

    you can use any version of JavaFX with e(fx)clipse, see http://efxclipse.org. You just have to set the JavaFX location in the Eclipse JavaFX Preferences.

  5. vini
    vini02-15-2012

    @kai Todter: thanx a lot…. :)

  6. Java desktop links of the week, February 21 | Jonathan Giles
    Java desktop links of the week, February 21 | Jonathan Giles02-21-2012

    [...] Kai Tödter has put up a screenshot comparing a JavaFX application before and after LCD text support. [...]

  7. Wolfgang
    Wolfgang02-22-2012

    @Kai Tödter
    We have a little discussion about delivering/bundling JavaFX in OSGI based applications here: https://forums.oracle.com/forums/thread.jspa?threadID=2336165&tstart=0

    Maybe you are interested and wish to contribute some interesting ideas too. Eclipse/FX actually is a promising combination.

  8. Kai Tödter
    Kai Tödter02-23-2012

    @Wolfgang

    Actually, http://efxclipse.org has very good JavaFX OSGi support. Take a look at the OSGi example.

  9. Zermatt
    Zermatt02-24-2012

    Just installed JavaFX v2.1 B14 on my system, on an application I’m working on the difference in text rendering is great compared to JavaFX v2.0. But what mystifies me is that the text I have for all my tabs is still aka JavaFX v2.0. However, when I look at your screen shots your text is crisp and sharp in the tabs, I wonder why that is? Surely I shouldn’t need to do any additional tweaks, right?

  10. Kai Tödter
    Kai Tödter02-24-2012

    @Zermatt
    It depends on the graphics card driver if LCD text is rendered with sub-pixel anti-aliasing. What graphics card do you have?

  11. Christian
    Christian02-29-2012

    I like this improvement, too.
    Does JavaFX take hinting for rendering small fonts into account?

  12. Tom
    Tom03-05-2012

    Very nice post! :)

    I am using JavaFX 2.1 Beta b15 (Win7 x86 SP1 + JDK 1.7.0_03), but the font rendering is still the same as on v2.0.3. When I run a JAR file it gives the following message (only since JavaFX 2.1):

    Adapter validation failed for all adapters
    Device “NVIDIA GeForce Go 7300 ” (.DISPLAY1) initialization failed :
    WARNING: Unsupported video adapter found, device disabled

    My GPU driver is up to date. Ah… any ideas, please?

  13. Tom
    Tom03-05-2012

    I am aware of the list of supported GPUs.
    http://docs.oracle.com/javafx/2.0/release_notes_2-1/jfxpub-release_notes_2-1.htm

    Is there any hack how to skip the validation?

  14. Gabriel Féron
    Gabriel Féron09-11-2012

    Hi, I found you article while searching on Google.

    I don’t know what’s going on with JavaFX 2.2 (included in JDK7u7) but the font rendering is definitely not good, both on Linux and on Windows. It might be better as it was previously, but it’s not using the system font rendering (from Xorg or Cleartype). Is there a way I can force JavaFX to render font using the system settings?

    Thanks,
    Gabriel

Leave a Reply