On Fri, Sep 4, 2015 at 3:29 AM, Huw Davies huw@codeweavers.com wrote:
... You can test the 'custom' glyph names by starting notepad, selecting Tahoma and typing a Euro sign for example. And no, it doesn't work. The length of the pascal strings is stored as a BYTE not a USHORT.
Sorry I didn't think of that on my own, I'll go ahead and fix and test that.
Also, you need to add some checks that you don't read past for end of the POST table and that you don't copy more than MAX_G_NAME chars into the provided name buffer (although this should perhaps be changed to a dynamic buffer).
I'll adjust the code to truncate to MAX_G_NAME characters, since (at least older versions) of the spec says that 31 characters is the max I don't think it makes sense to make a dynamic buffer: http://partners.adobe.com/public/developer/opentype/index_glyph2.html
Best, Erich