Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
0.20.5
-
None
-
None
-
Operating System: Windows 2000
Platform: PC
-
32391
Description
If I use a user defined font e.g Arial, that have more than one TTF file
(arial.ttf, arialbd.ttf, ...), the font selection is wrong when I switch back
from bold to normal.
The first way (normal to bold) works fine, but the way back use the bold font
file for the normal font.
I located the problem in AWTFontMetrics.java::setFont(). The "Buffered font." f1
in the source doesn't switch back to normal.
The font family is equal, but the style is different, so that the line:
f1 = f1.deriveFont(style, (float)s);
select the wrong font (style bold, metrics normal (looks ugly) ).
My local workaround was: disable caching, always create a new font.
Thomas