tinn...@yahoo.com
unread,Dec 26, 2012, 4:51:01 AM12/26/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sfntly...@googlegroups.com
I'm not sure how well I can describe this, but anyway,
When you take a slice of a WritableFontData (context: Creating a Glyph object), where the length of the slice is zero, should this not throw an exception for any attempt to read data from this slice? I ask because I found inconsistent behaviour between loading from a font from a byte array and directly from a file input stream. When loading from a byte array and calling the xMin() method of the created glyph (where data length=0), it goes fine, but if I do this from the same font loaded directly from an input stream, I get an IndexOutOfBoundsException. I should also note that for the glyph in question, if the length of the Glyph table is x, then the Glyph was at offset x, length 0.
I think with the byte array case, it was overrunning into whatever followed the glyph table, which I'm guessing is incorrect? Should there be a check against boundLength too for the read_ methods in ReadableFontData?
Thanks