Sorry if this was mentioned earlier in the thread, but what platform are you using?
On Jul 25, 2011, at 8:22 AM, Pierre Jansen wrote: > > 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. >
