Please find a screenshot attached. You'll notice that the 'S' and 'e's
are pixelated.

I'm running Ubuntu 10.04 with the Sun JRE (1.6.0_22).

I think your text is actually antialiased already, but I found that you can override what kind of hint is used by adding this code somewhere in your app before the rendering takes part, for example in the Application#startup() method:

Field aaHintValueField = FontRenderContext.class.getDeclaredField("aaHintValue");
        aaHintValueField.setAccessible(true);
aaHintValueField.set(Platform.getFontRenderContext(), RenderingHints.VALUE_TEXT_ANTIALIAS_GASP);


VALUE_TEXT_ANTIALIAS_GASP will often turn off antialiasing at some sizes, but you can play with different values. See http://download.oracle.com/javase/6/docs/api/java/awt/RenderingHints.html for more info.

-- edvin

Reply via email to