On Sun, Jul 24, 2011 at 11:38 PM, SYSE | Edvin <[email protected]> wrote:

> I think your text is actually antialiased already,


Thanks for looking into this. I'm not sure that this is the case though. As
a crude workaround, I sub-classed Label and overrode paint(Graphics2d),
allowing me to manually add the RenderingHints. I tried both
VALUE_TEXT_ANTIALIAS_LCD_ON and VALUE_TEXT_ANTIALIAS_LCD_HRGB. Both returned
different results to the default (VALUE_TEXT_ANTIALIAS_LCD_HRGB seemed to be
the best).


> 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);
>

Thanks, I'll give this a go - looks to be a far cleaner option than my
current workaround.

Reply via email to