ref: dadc50a4679c74ead5a283dd48a4164bc4a27cdd
parent: a3754d662652e12da290e504692ac08538bc1dd8
author: Werner Lemberg <[email protected]>
date: Thu Feb 2 02:13:29 EST 2017
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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2017-02-02 Werner Lemberg <[email protected]>
+
+ 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 <[email protected]>
* src/smooth/ftgrays.c (gray_render_scanline): Improve code.
--- a/include/freetype/internal/services/svmetric.h
+++ b/include/freetype/internal/services/svmetric.h
@@ -138,7 +138,7 @@
clazz->bsb_adjust = bsb_adjust_; \
clazz->vorg_adjust = vorg_adjust_; \
clazz->metrics_adjust = metrics_adjust_; \
- };
+ }
#endif /* FT_CONFIG_OPTION_PIC */
--- 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];
@@ -2833,6 +2837,10 @@
AF_Edge edge;
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
--- 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 */
--- 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,
--- a/src/autofit/afpic.h
+++ b/src/autofit/afpic.h
@@ -69,7 +69,7 @@
#define GET_PIC( lib ) \
- ( (AFModulePIC*)((lib)->pic_container.autofit) )
+ ( (AFModulePIC*)( (lib)->pic_container.autofit ) )
#define AF_SERVICES_GET \
( GET_PIC( library )->af_services )
--- a/src/autofit/aftypes.h
+++ b/src/autofit/aftypes.h
@@ -575,6 +575,7 @@
m_init, \
m_scale, \
m_done, \
+ m_stdw, \
h_init, \
h_apply ) \
FT_LOCAL_DEF( void ) \
--- 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;
@@ -1220,6 +1233,18 @@
clazz[i].array_max = max_; \
clazz[i].count_offset = FT_FIELD_OFFSET( num_ ## name_ ); \
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"
--- a/src/cff/cffpic.h
+++ b/src/cff/cffpic.h
@@ -63,7 +63,7 @@
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;