On Mon Jun 1 11:46:58 2026 +0000, समीरसिंह Sameer Singh wrote:
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; ``` Ok, yes, in this case it's not much worse to keep cmap too. But at the same time we already have 'page' array which is exactly the same - lazily allocated copy of a cmap. Generally I think it's easy to keep cmap in its original format, because it's fast to lookup already.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11035#note_142028