You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2004/11/25 15:47:59 UTC
DO NOT REPLY [Bug 32391] New: -
Wrong font selection with awt (print)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32391>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32391
Summary: Wrong font selection with awt (print)
Product: Fop
Version: 0.20.5
Platform: PC
OS/Version: Windows 2000
Status: NEW
Severity: normal
Priority: P2
Component: awt renderer
AssignedTo: fop-dev@xml.apache.org
ReportedBy: th567892000@yahoo.de
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
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.