DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4126>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4126 FontState.width() returns pts instead of millipts Summary: FontState.width() returns pts instead of millipts Product: Fop Version: all Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: general AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The following method in org.apache.fop.layout.FontState seems to be wrong: public int width(int charnum) { // returns width of given character number in millipoints return (_metric.width(charnum, _fontSize) / 1000); } It returns the width of the character in points, not millipoints. Since the result is an integer, the significant digits to the right of the decimal point are lost. I think the method should just return the metric width directly as follows: public int width(int charnum) { // returns width of given character number in millipoints return _metric.width(charnum, _fontSize); } I came across this bug when trying to find the width of a String using the method "public float getStringWidth(String str)" in the class org.apache.fop.svg.PDFTextPainter. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]