To display a complex multi-line label with multiple styling I use Swing's html rendering capabilities and end up with really crappy font rendering.
I have tried to explicitly set the font family -
infoLabel.setText("<html><span style='font-family:Tahoma;'>My text..
But compared to non-HTML text, the JLabel with HTML text always renders very ugly, looks like ant-aliasing is not happening. I tried font smooth CSS property :
<html><span style="font-family:Tahoma;font-smooth:always;">
But the rendered html by Swing still looks ugly. If I don't use html styling in setText it looks fine. I am ensuring I am using the same font family, font size etc.
What could be the issue ?