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=41733>. 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=41733 Summary: svggen Font fails to load Arial Unicode in Batik 1.6 Product: Batik Version: 1.6 Platform: All OS/Version: Windows XP Status: NEW Severity: regression Priority: P2 Component: SVGGraphics2D AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] Here's the stacktrace: java.lang.NegativeArraySizeException at org.apache.batik.svggen.font.table.HmtxTable.init(HmtxTable.java:59) at org.apache.batik.svggen.font.Font.read(Font.java:178) at org.apache.batik.svggen.font.Font.create(Font.java:196) If I had to take a guess at a solution, from that stacktrace it appears Batik failed to read a value for numberOfHMetrics from the HHEA table in the TTF. I took a quick look at the TTF specification from Microsoft and it appears this value is an unsigned short: http://www.microsoft.com/OpenType/OTSpec/hhea.htm ...however, Apache Batik is reading it in as a normal Java short (which is signed) on line 58 of org.apache.batik.svggen.font.table.HheaTable. The huge number of glyph entries in Arial Unicode probably means the number of entries in the HMTX table exceeds 32768 hence the short wraps around to a negative value, and thus the initialization of the hMetrics Array fails. Using an int to store this value and correcting for the negative bit with a mask should solve the problem. Note that we think we've successfully run tests with Arial Unicode in the past, so perhaps this is a regression in Batik 1.6? -- 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. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
