Re: [PATCH 0/4] MR11035: gdi32/uniscribe: Eagerly cache cmap tables for a font.
I should probably explain my changes here. The game Sail Simulator 5 was crashing due to usp10 because it relied on a Windows behaviour where the OS will cache all of the glyphs of the font in the ScriptCache when a valid hdc is present, so the next time when the shaping function is called with a null hdc, the os can then look at the ScriptCache for the glyph to see if it exists. Prior to this patch wine did not do that, it only stored the glyphs in the cache which were encountered in previous shaping runs. So what I did was add a cmap format 4 table (the cmap table which is used for the BMP plane of unicode) to the ScriptCache and then eagerly load the tables when ScriptShapeOpenType is called. So when the shaping function is called again with an invalid hdc, instead of immediately returning `E_PENDING` check for the glyph in the cmap table first. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11035#note_141803
participants (1)
-
समीरसिंह Sameer Singh (@ss141309)