|
From: | 丁力 |
Subject: | [ft-devel] About the Cmap format 12 |
Date: | Mon, 24 Sep 2007 17:57:25 +0800 |
I found that FreeType can not get the
correct glyph index from the font “Simsun-extb” corroding the Unicode of the
character. In the TTF, the cmap table use the format
12, and I always get 0, from the function FT_Get_Char_Index(), I think it maybe
a bug to deal with the cmap which is format 12. We can see that
the Unicode is no in the range seg 2(00020000 - 0002A6D6), so there must be
some error in the function tt_cmap12_char_map_binary() in “src\sfnt\ttcmap.c”. This is a segment of
the cmap in the font: Subtable
3. Platform ID: 3
Specific ID: 10
'cmap' Offset: 0x00000142
->Format: 12 : Segmented coverage (32 bit) Length: 40 Version: 0 Seg
1 : startCharCode = 00000020, endCharCode = 0000007F, startGlyphCode = 2 Seg
2 : startCharCode = 00020000, endCharCode = 0002A6D6, startGlyphCode = 98 Which
Means:
1. Char 00000020 -> Index 2
Char 00000021 -> Index 3
Char 00000022 -> Index 4 …………………………………… ……………………………… Thanks. Regards, 2007-09-24 |
[Prev in Thread] | Current Thread | [Next in Thread] |