shithub: freetype+ttf2subf

Download patch

ref: 8cf9b74cf06aed77c874d94477cfbb0ce08eeea2
parent: 173bdc681a333ba448310439b810b100b70f448d
author: Lars Abrahamsson <[email protected]>
date: Thu Dec 31 13:26:14 EST 2009

Make compilation with FT_CONFIG_OPTION_PIC work again.

* src/base/ftglyph.c (FT_Glyph_To_Bitmap) [FT_CONFIG_OPTION_PIC]:
Declare `library' for FT_BITMAP_GLYPH_CLASS_GET.

* src/base/ftinit.c (ft_destroy_default_module_classes,
ft_create_default_module_classes): Use proper casts (needed for C++
compilation).

* src/sfnt/ttcmap.c (tt_cmap13_class_rec): Use FT_DEFINE_TT_CMAP.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2009-12-31  Lars Abrahamsson  <[email protected]>
+
+	Make compilation with FT_CONFIG_OPTION_PIC work again.
+
+	* src/base/ftglyph.c (FT_Glyph_To_Bitmap) [FT_CONFIG_OPTION_PIC]:
+	Declare `library' for FT_BITMAP_GLYPH_CLASS_GET.
+
+	* src/base/ftinit.c (ft_destroy_default_module_classes,
+	ft_create_default_module_classes): Use proper casts (needed for C++
+	compilation).
+
+	* src/sfnt/ttcmap.c (tt_cmap13_class_rec): Use FT_DEFINE_TT_CMAP.
+
 2009-12-22  Marc Kleine-Budde  <[email protected]>
 
 	Make freetype-config aware of $SYSROOT.
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -372,7 +372,7 @@
     if ( slot->format == FT_GLYPH_FORMAT_BITMAP )
       clazz = FT_BITMAP_GLYPH_CLASS_GET;
 
-    /* it it is an outline too */
+    /* if it is an outline */
     else if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
       clazz = FT_OUTLINE_GLYPH_CLASS_GET;
 
@@ -514,6 +514,10 @@
     FT_BitmapGlyph            bitmap = NULL;
 
     const FT_Glyph_Class*     clazz;
+
+#ifdef FT_CONFIG_OPTION_PIC
+    FT_Library                library = FT_GLYPH( glyph )->library;
+#endif
 
 
     /* check argument */
--- a/src/base/ftinit.c
+++ b/src/base/ftinit.c
@@ -115,7 +115,7 @@
     FT_Module_Class** classes;
     FT_Memory         memory;
     FT_UInt           i;
-    BasePIC*          pic_container = library->pic_container.base;
+    BasePIC*          pic_container = (BasePIC*)library->pic_container.base;
 
     if ( !pic_container->default_module_classes )
       return;
@@ -145,7 +145,7 @@
     FT_Module_Class** classes;
     FT_Module_Class*  clazz;
     FT_UInt           i;
-    BasePIC*          pic_container = library->pic_container.base;
+    BasePIC*          pic_container = (BasePIC*)library->pic_container.base;
 
     memory = library->memory;  
     pic_container->default_module_classes = 0;
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -2574,10 +2574,7 @@
   }
 
 
-  FT_CALLBACK_TABLE_DEF
-  const TT_CMap_ClassRec  tt_cmap13_class_rec =
-  {
-    {
+  FT_DEFINE_TT_CMAP(tt_cmap13_class_rec,
       sizeof ( TT_CMap13Rec ),
 
       (FT_CMap_InitFunc)     tt_cmap13_init,
@@ -2586,11 +2583,11 @@
       (FT_CMap_CharNextFunc) tt_cmap13_char_next,
 
       NULL, NULL, NULL, NULL, NULL
-    },
+    ,
     13,
     (TT_CMap_ValidateFunc)   tt_cmap13_validate,
     (TT_CMap_Info_GetFunc)   tt_cmap13_get_info
-  };
+  )
 
 #endif /* TT_CONFIG_CMAP_FORMAT_13 */