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.
This commit is contained in:
Werner Lemberg 2017-02-02 07:13:29 +01:00
parent a3754d6626
commit dadc50a467
9 changed files with 79 additions and 15 deletions

View File

@ -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.

View File

@ -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 */

View File

@ -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];

View File

@ -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 */

View File

@ -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,

View File

@ -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 )

View File

@ -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 ) \

View File

@ -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;

View File

@ -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;