CVSROOT: /cvsroot/freetype Module name: freetype2 Branch: Changes by: Chia-I Wu <[EMAIL PROTECTED]> 05/11/29 11:32:53
Modified files: . : ChangeLog src/sfnt : ttcmap.c ttcmap.h Log message: Major update to distinguish between unsorted and overlapped segments for cmap format 4. For overlapped but sorted segments, which is previously considered unsorted, we still use binary search. * src/sfnt/ttcmap.h (struct TT_CMapRec_): Replace `unsorted' by `flags'. (TT_CMAP_FLAG_UNSORTED, TT_CMAP_FLAG_OVERLAPPED): New macros. * src/sfnt/ttcmap.c (OPT_CMAP4): Removed as it is always defined. (struct TT_CMap4Rec_): Remove `old_charcode' and `table_length'. (tt_cmap4_reset): Removed. (tt_cmap4_init): Updated accordingly. (tt_cmap4_next): Updated accordingly. Take care of overlapped segments. (tt_cmap4_validate): Make sure the subtable is large enough. Do not check glyph_ids because some fonts set the length wrongly. Also, when all segments have offset 0, glyph_ids is always invalid. It does not cause any problem so far only because the check misses equality. Distinguish between unsorted and overlapped segments. (tt_cmap4_char_map_linear, tt_cmap4_char_map_binary): New functions to do "charcode => glyph index" by linear/binary search. (tt_cmap4_char_index, tt_cmap4_char_next): Use tt_cmap4_char_map_linear and tt_cmap4_char_map_binary. (tt_face_build_cmaps): Treat the return value of validator as flags for cmap. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/freetype/freetype2/ChangeLog.diff?tr1=1.1143&tr2=1.1144&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/freetype/freetype2/src/sfnt/ttcmap.c.diff?tr1=1.57&tr2=1.58&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/freetype/freetype2/src/sfnt/ttcmap.h.diff?tr1=1.17&tr2=1.18&r1=text&r2=text _______________________________________________ Freetype-cvs mailing list Freetype-cvs@nongnu.org http://lists.nongnu.org/mailman/listinfo/freetype-cvs