ref: 3739f8b987ef385fdaefc887922f76c9d0066311
parent: 4f7ef401eadeae55328c7a064498446336e9d77e
author: Werner Lemberg <[email protected]>
date: Sun Jan 18 08:13:17 EST 2009
Protect FT_Get_Next_Char. * src/sfnt/ttcmap.c (tt_cmap4_set_range): Apply fix similar to change from 2008-07-22. Patch from Ronen Ghoshal <[email protected]>.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2009-01-18 Werner Lemberg <[email protected]>
+ Protect FT_Get_Next_Char.
+
+ * src/sfnt/ttcmap.c (tt_cmap4_set_range): Apply fix similar to
+ change from 2008-07-22.
+
+ Patch from Ronen Ghoshal <[email protected]>.
+
+2009-01-18 Werner Lemberg <[email protected]>
+
Implement FT_Get_Name_Index for SFNT driver.
* src/sfnt/sfdriver.c (sfnt_get_name_index): New function.
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -4,7 +4,7 @@
/* */
/* TrueType character mapping table (cmap) support (body). */
/* */
-/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
+/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -696,6 +696,14 @@
p += num_ranges * 2;
offset = FT_PEEK_USHORT( p );
+
+ /* some fonts handle the last segment incorrectly; */
+ /* we have to catch it */
+ if ( range_index >= num_ranges - 1 &&
+ cmap->cur_start == 0xFFFFU &&
+ cmap->cur_end == 0xFFFFU &&
+ cmap->cur_delta == 0x1U )
+ offset = 0;
if ( offset != 0xFFFFU )
{