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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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.

Reply via email to