shithub: freetype+ttf2subf

Download patch

ref: b72e046098edd0a93992a251759e6bfffea74e78
parent: e891e4d6f130408d171724723673472a4e0359f9
author: suzuki toshiya <[email protected]>
date: Thu Nov 4 19:09:05 EDT 2010

[UVS] Remove non-essential pointer checking in previous commit.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,23 +1,3 @@
-2010-11-04  suzuki toshiya  <[email protected]>
-
-	[UVS] Stabilizes UVS supporting functions against non-UVS fonts.
-
-	UVS supporting functions assume the variation handler functions
-	are valid.  When fonts without cmap format 14 is given, these
-	function pointers are left as NULL, so calling these functions
-	causes NULL pointer dereference.
-
-	* src/base/ftobjs.c (FT_Face_GetCharVariantIndex): Check the pointer
-	FT_CMap_Class->char_var_index before calling it.
-	(FT_Face_GetCharVariantIsDefault): Check the pointer
-	FT_CMap_Class->char_var_default before calling it.
-	(FT_Face_GetVariantSelectors): Check the pointer
-	FT_CMap_Class->variant_list before calling it.
-	(FT_Face_GetVariantsOfChar): Check the pointer
-	FT_CMap_Class->charvariant_list before calling it.
-	(FT_Face_GetCharsOfVariant): Check the pointer 
-	FT_CMap_Class->variantchar_list before calling it.
-
 2010-11-01  Alexei Podtelezhnikov  <[email protected]>
 
 	[ftsmooth] Improve rendering.
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -3291,10 +3291,6 @@
         FT_CMap  vcmap = FT_CMAP( charmap );
 
 
-	/* font without TT cmap format 14 has no char_var_index() */
-        if ( !( vcmap->clazz ) || !( vcmap->clazz->char_var_index ) )
-          return result;
-
         if ( charcode > 0xFFFFFFFFUL )
         {
           FT_TRACE1(( "FT_Get_Char_Index: too large charcode" ));
@@ -3336,10 +3332,6 @@
         FT_CMap  vcmap = FT_CMAP( charmap );
 
 
-	/* font without TT cmap format 14 has no char_var_index() */
-        if ( !( vcmap->clazz ) || !( vcmap->clazz->char_var_default ) )
-          return result;
-
         if ( charcode > 0xFFFFFFFFUL )
         {
           FT_TRACE1(( "FT_Get_Char_Index: too large charcode" ));
@@ -3380,10 +3372,6 @@
         FT_Memory  memory = FT_FACE_MEMORY( face );
 
 
-	/* font without TT cmap format 14 has no variant_list() */
-        if ( !( vcmap->clazz ) || !( vcmap->clazz->variant_list ) )
-          return result;
-
         result = vcmap->clazz->variant_list( vcmap, memory );
       }
     }
@@ -3412,10 +3400,6 @@
         FT_Memory  memory = FT_FACE_MEMORY( face );
 
 
-	/* font without TT cmap format 14 has no charvariant_list() */
-        if ( !( vcmap->clazz ) || !( vcmap->clazz->charvariant_list ) )
-          return result;
-
         if ( charcode > 0xFFFFFFFFUL )
         {
           FT_TRACE1(( "FT_Get_Char_Index: too large charcode" ));
@@ -3449,10 +3433,6 @@
         FT_CMap    vcmap  = FT_CMAP( charmap );
         FT_Memory  memory = FT_FACE_MEMORY( face );
 
-
-	/* font without TT cmap format 14 has no variantchar_list() */
-        if ( !( vcmap->clazz ) || !( vcmap->clazz->variantchar_list ) )
-          return result;
 
         if ( variantSelector > 0xFFFFFFFFUL )
         {