问题
I am developing a Java swing Application with a Synth look and feel. The application has a background image that contains some text, and I need some 'active' text (text in a JLabel) above this background layer. However, the font I have chosen (Verdana), renders terribly in Swing for some reason, and as such, the font of the active text does not match the font of the background. Does anyone know of a way to make the text a little smoother-looking in Swing? I have found similar problems here and here, but I'm unsure as to what effect AA has on the rest of the applications images, or whether to use AWT desktop Properties or the -Dswing.aatext=true flag. Any tips would be much appreciated. Thanks!
EDIT: I have tested this in OSX, as well as Windows 7, both exhibit the same effect.
回答1:
This is a problem with Swing itself I believe. Look at the related questions.
Using FontForge to disabling hinting can help in my experience.
来源:https://stackoverflow.com/questions/8402797/swing-font-rendering