https://bugs.winehq.org/show_bug.cgi?id=44410
--- Comment #8 from Thomas Faber thomas.faber@reactos.org --- Created attachment 62997 --> https://bugs.winehq.org/attachment.cgi?id=62997 Patch with some tests and related fixes
Yeah, as you may have guessed I got sidetracked, and currently don't have time for this.
My idea of the correct fix was to simply use get_cache_glyph when appropriate (either in get_cache_glyph_widths or its callers), i.e. make the cache store glyph widths, and translate from chars where needed.
My approach to testing this was to try to validate Wine's implementation by comparing the results from ScriptGetGlyphABCWidth with GetCharABCWidthsW/GetCharABCWidthsI, as in the patch I'm attaching. I seem to recall that the test as-is already showed a difference between the broken and fixed width caches, but I haven't reduced it down to make a concise test case yet. There's also a lot of variance introduced by choice of font, and I'm not sure I was done playing with that.
Hope that helps. Thanks.