JavaFX 2.1 Beta: Improved Font Rendering

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

This Post Has 14 Comments

  1. Wolfgang

    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

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

  3. Kai Tödter

    @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. vini

    @kai Todter: thanx a lot…. 🙂

  5. Zermatt

    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?

  6. Kai Tödter

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

  7. Christian

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

  8. Tom

    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?

  9. Gabriel Féron

    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 to Gabriel Féron Cancel reply

I accept the Privacy Policy