Open zhzhzoo opened 10 years ago
Solved. Adobe Flash Player reads the offsetTable first, then look up the glyphShapeTable for a given character when encountered. So some SWF may have glyphShapeTable not immediately following codeTableOffset or vacancies between glyphShape entries, however, as the SWF provided correct offsetTable, it can be recognised by Adobe Flash Player.
The dropbox link is no longer available. Could you provide the example again?
I did not fully understand your explanations, but I tested it against my own parsers and it seem to work.
Here are the relevant functions, I hope it may help to fix it here:
I am effectively reading the offset table first and then using it to parse the glyphs.
(Your example also helped me find out that my implementation does not discard the terminating null-byte of the font name, thanks.)
I'm parsing some swf when I encountered this error. The file does't seem to conform to the swf file spec, however, Adobe Flash Player can play it.
Here is the file: https://www.dropbox.com/s/n02lbplm77exmhp/page003.swf