freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft-devel] compile errors when using FT_CONFIG_OPTION_PIC


From: Lars Abrahamsson
Subject: [ft-devel] compile errors when using FT_CONFIG_OPTION_PIC
Date: Wed, 30 Dec 2009 16:39:31 +0100
User-agent: Opera Mail/10.10 (Linux)

hi,

building current freetype from your git repo i've run into some compile problems when FT_CONFIG_OPTION_PIC is defined. since i don't have an account on savannah i figured i'd send you a patch (attached) - i hope this is ok. anyways, here are the individual diffs, with an explanation of what's been done.

keep up the good work :)

/ lasse



* FT_BITMAP_GLYPH_CLASS_GET uses library when FT_CONFIG_OPTION_PIC is defined:

diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c
index ef61d45..65e9d90 100644
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -515,6 +515,10 @@

     const FT_Glyph_Class*     clazz;

+#ifdef FT_CONFIG_OPTION_PIC
+    FT_Library      library = FT_GLYPH( glyph )->library;
+#endif /* FT_CONFIG_OPTION_PIC */
+

     /* check argument */
     if ( !the_glyph )



* cast library->pic_container.base to BasePIC* - only needed if compiling with C++ compiler, but shouldn't hurt regardless:

diff --git a/src/base/ftinit.c b/src/base/ftinit.c
index ef13503..f94f25a 100644
--- 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;



* initialization of tt_cmap13_class_rec should conform to that of other formats:

diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index 26ea83c..b283f6d 100644
--- 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 */

Attachment: ft2_3_11_pic.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]