I need to do font smoothing for a AWT application on Windows System. On doing googling I came to know that I can set following VM argument in Eclipse.
-Dawt.useSystemAAFontSettings=gasp
But this is not yielding any positive results. If anyone is having a better idea on how to achieve Font Smoothing, then kindly let me know.
EDIT After Answer By Andrew
I added the following snippet of code in paint method
public class BottomSubmitButtons extends Canvas {
@Override
public void paint(Graphics g) {
Graphics2D g2 = (Graphics2D)g;
RenderingHints rh = new RenderingHints(
RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_GASP);
g2.setRenderingHints(rh);
}
}
This seems to have improved the smoothing in one of the sub panel. But doing the same in other panel is not yielding any smoothing. Also the TextField boxes are going invisible by default, though they becomes visible once I click in that area
Play with the values for RenderingHints.KEY_TEXT_LCD_CONTRAST
. When you find something that works, use that as the command line value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With