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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211
diff --git a/ChangeLog b/ChangeLog
index a5a9cc1..0b9c42b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2017-02-02 Werner Lemberg <wl@gnu.org>
+
+ 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 <apodtele@gmail.com>
* 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;