Skip to content

Commit a727273

Browse files
authored
[FREETYPE] HACK: Verify we have format 4 for tt_cmap4_char_map_binary (reactos#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
1 parent c5c0e59 commit a727273

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

  • sdk/lib/3rdparty/freetype/src/sfnt

sdk/lib/3rdparty/freetype/src/sfnt/ttcmap.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,6 +1233,21 @@
12331233
FT_UInt gindex = 0;
12341234
FT_Byte* p;
12351235

1236+
#ifdef __REACTOS__
1237+
static FT_UInt bWarnOnce = 0;
1238+
/* FIXME: HACK for ReactOS not updating fonts when new font copied
1239+
* over existing one. Verify that the table number is 4. CORE-12549 */
1240+
if (TT_PEEK_USHORT(cmap->data) != 4)
1241+
{
1242+
if (!bWarnOnce)
1243+
{
1244+
FT_ERROR(( "Bad cmap table number. Probable update font error in file\n"
1245+
"'%s'\nPlease reboot and try again.\n", __FILE__ ));
1246+
bWarnOnce++;
1247+
}
1248+
return 0;
1249+
}
1250+
#endif
12361251

12371252
p = cmap->data + 6;
12381253
num_segs2 = FT_PAD_FLOOR( TT_PEEK_USHORT( p ), 2 );

0 commit comments

Comments
 (0)