Re: [PATCH v2 0/4] MR11035: gdi32/uniscribe: Eagerly cache cmap tables for a font.
On Mon Jun 1 11:28:47 2026 +0000, Nikolay Sivov wrote:
Then referenced font objects could also be kept around, after GDI handles are released. The point is that keeping just cmap is clearly not enough for shaping to work. And duplicating all of the font data for every cache instance also would be a strange solution. Regarding. "keeping just cmap is clearly not enough for shaping to work", the `ScriptCache` struct already stores raw table data for GSUB, GPOS and GDEF so shaping is possible. Adding cmap format4 to the struct (cmap format 12 was already present) follows the same established pattern.
Here is what the struct looked prior to my patch: ```c typedef struct { struct list entry; DWORD refcount; LOGFONTW lf; TEXTMETRICW tm; OUTLINETEXTMETRICW *otm; SCRIPT_FONTPROPERTIES sfp; BOOL sfnt; CacheGlyphPage *page[NUM_PAGES]; ABC *widths[GLYPH_MAX / GLYPH_BLOCK_SIZE]; void *GSUB_Table; void *GDEF_Table; void *CMAP_Table; void *CMAP_format12_Table; void *GPOS_Table; BOOL scripts_initialized; LoadedScript *scripts; SIZE_T scripts_size; SIZE_T script_count; OPENTYPE_TAG userScript; OPENTYPE_TAG userLang; } ScriptCache; ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11035#note_141855
participants (1)
-
समीरसिंह Sameer Singh (@ss141309)