freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master dadc50a: Make compilation with FT_CONFIG_OPTION_PIC w


From: Werner LEMBERG
Subject: [freetype2] master dadc50a: Make compilation with FT_CONFIG_OPTION_PIC work again.
Date: Thu, 2 Feb 2017 06:13:48 +0000 (UTC)

branch: master
commit dadc50a4679c74ead5a283dd48a4164bc4a27cdd
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    Make compilation with FT_CONFIG_OPTION_PIC work again.
    
    All code committed here is guarded with `FT_CONFIG_OPTION_PIC'.
    
    * include/freetype/internal/services/svmetric.h
    (FT_DEFINE_SERVICE_METRICSVARIATIONSREC): Remove trailing semicolon.
    
    * src/autofit/aflatin.c (af_latin_hints_compute_edges,
    af_latin_hint_edges): Provide `globals' variable.
    
    * src/autofit/afloader.c (af_loader_load_glyph): Remove shadowing
    variable.
    
    * src/autofit/afmodule.c (AF_SCRIPT_CLASSES_GET,
    AF_STYLE_CLASSES_GET): Redefine.
    
    * src/autofit/aftypes.h (AF_DEFINE_WRITING_SYSTEM_CLASS): Fix typo.
    
    * src/cff/cffparse.c (CFF_FIELD_BLEND): Provide it.
    
    * src/cff/cffpic.h (CffModulePIC): Fix typo.
---
 ChangeLog                                     |   24 ++++++++++++++++++++++++
 include/freetype/internal/services/svmetric.h |    2 +-
 src/autofit/aflatin.c                         |    8 ++++++++
 src/autofit/afloader.c                        |   17 +++++------------
 src/autofit/afmodule.c                        |   13 +++++++++++++
 src/autofit/afpic.h                           |    2 +-
 src/autofit/aftypes.h                         |    1 +
 src/cff/cffparse.c                            |   25 +++++++++++++++++++++++++
 src/cff/cffpic.h                              |    2 +-
 9 files changed, 79 insertions(+), 15 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a5a9cc1..0b9c42b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2017-02-02  Werner Lemberg  <address@hidden>
+
+       Make compilation with FT_CONFIG_OPTION_PIC work again.
+
+       All code committed here is guarded with `FT_CONFIG_OPTION_PIC'.
+
+       * include/freetype/internal/services/svmetric.h
+       (FT_DEFINE_SERVICE_METRICSVARIATIONSREC): Remove trailing semicolon.
+
+       * src/autofit/aflatin.c (af_latin_hints_compute_edges,
+       af_latin_hint_edges): Provide `globals' variable.
+
+       * src/autofit/afloader.c (af_loader_load_glyph): Remove shadowing
+       variable.
+
+       * src/autofit/afmodule.c (AF_SCRIPT_CLASSES_GET,
+       AF_STYLE_CLASSES_GET): Redefine.
+
+       * src/autofit/aftypes.h (AF_DEFINE_WRITING_SYSTEM_CLASS): Fix typo.
+
+       * src/cff/cffparse.c (CFF_FIELD_BLEND): Provide it.
+
+       * src/cff/cffpic.h (CffModulePIC): Fix typo.
+
 2017-01-31  Alexei Podtelezhnikov  <address@hidden>
 
        * src/smooth/ftgrays.c (gray_render_scanline): Improve code.
diff --git a/include/freetype/internal/services/svmetric.h 
b/include/freetype/internal/services/svmetric.h
index cac9bf8..1f7d5dd 100644
--- a/include/freetype/internal/services/svmetric.h
+++ b/include/freetype/internal/services/svmetric.h
@@ -138,7 +138,7 @@ FT_BEGIN_HEADER
     clazz->bsb_adjust      = bsb_adjust_;                             \
     clazz->vorg_adjust     = vorg_adjust_;                            \
     clazz->metrics_adjust  = metrics_adjust_;                         \
-  };
+  }
 
 #endif /* FT_CONFIG_OPTION_PIC */
 
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index ccea547..916095d 100644
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -1951,6 +1951,10 @@
     FT_Memory     memory = hints->memory;
     AF_LatinAxis  laxis  = &((AF_LatinMetrics)hints->metrics)->axis[dim];
 
+#ifdef FT_CONFIG_OPTION_PIC
+    AF_FaceGlobals  globals = hints->metrics->globals;
+#endif
+
     AF_StyleClass   style_class  = hints->metrics->style_class;
     AF_ScriptClass  script_class = AF_SCRIPT_CLASSES_GET
                                      [style_class->script];
@@ -2834,6 +2838,10 @@
     AF_Edge       anchor     = NULL;
     FT_Int        has_serifs = 0;
 
+#ifdef FT_CONFIG_OPTION_PIC
+    AF_FaceGlobals  globals = hints->metrics->globals;
+#endif
+
     AF_StyleClass   style_class  = hints->metrics->style_class;
     AF_ScriptClass  script_class = AF_SCRIPT_CLASSES_GET
                                      [style_class->script];
diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c
index 792b3fe..c8c2e20 100644
--- a/src/autofit/afloader.c
+++ b/src/autofit/afloader.c
@@ -375,18 +375,11 @@
 
       /* now load the slot image into the auto-outline */
       /* and run the automatic hinting process         */
-      {
-#ifdef FT_CONFIG_OPTION_PIC
-        AF_FaceGlobals  globals = loader->globals;
-#endif
-
-
-        if ( writing_system_class->style_hints_apply )
-          writing_system_class->style_hints_apply( glyph_index,
-                                                   hints,
-                                                   &gloader->base.outline,
-                                                   style_metrics );
-      }
+      if ( writing_system_class->style_hints_apply )
+        writing_system_class->style_hints_apply( glyph_index,
+                                                 hints,
+                                                 &gloader->base.outline,
+                                                 style_metrics );
 
       /* we now need to adjust the metrics according to the change in */
       /* width/positioning that occurred during the hinting process   */
diff --git a/src/autofit/afmodule.c b/src/autofit/afmodule.c
index be81283..1566baf 100644
--- a/src/autofit/afmodule.c
+++ b/src/autofit/afmodule.c
@@ -104,6 +104,19 @@
   }
 
 
+#ifdef FT_CONFIG_OPTION_PIC
+
+#undef  AF_SCRIPT_CLASSES_GET
+#define AF_SCRIPT_CLASSES_GET  \
+          ( GET_PIC( ft_module->library )->af_script_classes )
+
+#undef  AF_STYLE_CLASSES_GET
+#define AF_STYLE_CLASSES_GET  \
+          ( GET_PIC( ft_module->library )->af_style_classes )
+
+#endif
+
+
   static FT_Error
   af_property_set( FT_Module    ft_module,
                    const char*  property_name,
diff --git a/src/autofit/afpic.h b/src/autofit/afpic.h
index 7d444e5..8cd3392 100644
--- a/src/autofit/afpic.h
+++ b/src/autofit/afpic.h
@@ -69,7 +69,7 @@ FT_BEGIN_HEADER
 
 
 #define GET_PIC( lib )  \
-          ( (AFModulePIC*)((lib)->pic_container.autofit) )
+          ( (AFModulePIC*)( (lib)->pic_container.autofit ) )
 
 #define AF_SERVICES_GET  \
           ( GET_PIC( library )->af_services )
diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h
index 3be701e..718dab7 100644
--- a/src/autofit/aftypes.h
+++ b/src/autofit/aftypes.h
@@ -575,6 +575,7 @@ extern void*  _af_debug_hints;
           m_init,                                                         \
           m_scale,                                                        \
           m_done,                                                         \
+          m_stdw,                                                         \
           h_init,                                                         \
           h_apply )                                                       \
   FT_LOCAL_DEF( void )                                                    \
diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c
index 819332b..59fa290 100644
--- a/src/cff/cffparse.c
+++ b/src/cff/cffparse.c
@@ -1125,6 +1125,8 @@
 #define CFF_FIELD_DELTA( code, name, max, id ) i++;
 #undef CFF_FIELD_CALLBACK
 #define CFF_FIELD_CALLBACK( code, name, id ) i++;
+#undef CFF_FIELD_BLEND
+#define CFF_FIELD_BLEND( code, id ) i++;
 
 #include "cfftoken.h"
 
@@ -1172,6 +1174,17 @@
           clazz[i].count_offset = FT_FIELD_OFFSET( num_ ## name_ ); \
           i++;
 
+#undef  CFF_FIELD_BLEND
+#define CFF_FIELD_BLEND( code_, id_ )              \
+          clazz[i].kind         = cff_kind_blend;  \
+          clazz[i].code         = code_ | CFFCODE; \
+          clazz[i].offset       = 0;               \
+          clazz[i].size         = 0;               \
+          clazz[i].reader       = cff_parse_blend; \
+          clazz[i].array_max    = 0;               \
+          clazz[i].count_offset = 0;               \
+          i++;
+
 #include "cfftoken.h"
 
     clazz[i].kind         = 0;
@@ -1222,6 +1235,18 @@
           clazz[i].id           = id_;                              \
           i++;
 
+#undef  CFF_FIELD_BLEND
+#define CFF_FIELD_BLEND( code_, id_ )              \
+          clazz[i].kind         = cff_kind_blend;  \
+          clazz[i].code         = code_ | CFFCODE; \
+          clazz[i].offset       = 0;               \
+          clazz[i].size         = 0;               \
+          clazz[i].reader       = cff_parse_blend; \
+          clazz[i].array_max    = 0;               \
+          clazz[i].count_offset = 0;               \
+          clazz[i].id           = id_;             \
+          i++;
+
 #include "cfftoken.h"
 
     clazz[i].kind         = 0;
diff --git a/src/cff/cffpic.h b/src/cff/cffpic.h
index 1d36323..5db39cd 100644
--- a/src/cff/cffpic.h
+++ b/src/cff/cffpic.h
@@ -63,7 +63,7 @@ FT_BEGIN_HEADER
     FT_Service_TTCMapsRec            cff_service_get_cmap_info;
     FT_Service_CIDRec                cff_service_cid_info;
     FT_Service_PropertiesRec         cff_service_properties;
-    FT_Service_MultiMastersRec       cff_service_multiple_masters;
+    FT_Service_MultiMastersRec       cff_service_multi_masters;
     FT_Service_MetricsVariationsRec  cff_service_metrics_variations;
     FT_CMap_ClassRec                 cff_cmap_encoding_class_rec;
     FT_CMap_ClassRec                 cff_cmap_unicode_class_rec;



reply via email to

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