On Thu, Sep 3, 2015 at 1:37 AM, Huw Davies huw@codeweavers.com wrote:
On Thu, Sep 03, 2015 at 06:59:56AM +0300, Nikolay Sivov wrote:
I think what we want is to map from WCHAR string to such glyph names directly, and that's why ETO_GLYPH_INDEX case is important - if you get index array initially you fallback to generic glyph names, if you got string then for codepoints that have defined glyphs in your names array you use those, for the rest of codepoints fallback again to generic name. This way we could also extend this lookup when it's decided how to deal with licensed glyph list data.
Note that we already have many of the glyph names in PSDRV_AGLbyUV[] and friends (see wineps.drv/data/agl.[ch]).
Ok, I've done some more research on this and it looks like what we should do is pull up the 'post' table and use the standard glyph names if the table is in format 1 or 2 (and index is < 258). If the table is in format 2 there's also the possibility of custom names in addition to the standard names. In later formats the layout of the table changes somewhat.
Based on this information I've attached a version of the patch that checks the format and returns the standard glyphs if the format is "correct". I'm not sure if ETO_GLYPH_INDEX is relevant to this, as it appears that the glyph indices are always in terms of the "mac" ordering. Do you have an application that generates an example of this? I also found a draft version of ISO/IEC CD 14496-22 that says that Format 2 is required for fonts used on Windows, though I think it's in our best interest to support all the formats our users care about.
Best, Erich