From a727273fbf9b228a3621b9567ea9502963ad53c4 Mon Sep 17 00:00:00 2001 From: Doug Lyons Date: Wed, 4 Feb 2026 00:39:05 -0600 Subject: [PATCH] [FREETYPE] HACK: Verify we have format 4 for tt_cmap4_char_map_binary (#8649) [FREETYPE] HACK: Verify the cmap format 4 is used in the function "tt_cmap4_char_map_binary" in ttcmap.c before proceeding. Otherwise issue debug message. CORE-12549 --- sdk/lib/3rdparty/freetype/src/sfnt/ttcmap.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sdk/lib/3rdparty/freetype/src/sfnt/ttcmap.c b/sdk/lib/3rdparty/freetype/src/sfnt/ttcmap.c index 8d9737310c7..2b97a7ba809 100644 --- a/sdk/lib/3rdparty/freetype/src/sfnt/ttcmap.c +++ b/sdk/lib/3rdparty/freetype/src/sfnt/ttcmap.c @@ -1233,6 +1233,21 @@ FT_UInt gindex = 0; FT_Byte* p; +#ifdef __REACTOS__ + static FT_UInt bWarnOnce = 0; + /* FIXME: HACK for ReactOS not updating fonts when new font copied + * over existing one. Verify that the table number is 4. CORE-12549 */ + if (TT_PEEK_USHORT(cmap->data) != 4) + { + if (!bWarnOnce) + { + FT_ERROR(( "Bad cmap table number. Probable update font error in file\n" + "'%s'\nPlease reboot and try again.\n", __FILE__ )); + bWarnOnce++; + } + return 0; + } +#endif p = cmap->data + 6; num_segs2 = FT_PAD_FLOOR( TT_PEEK_USHORT( p ), 2 );