diff --git a/ChangeLog b/ChangeLog index c75a316e0..d6d0be11f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2017-09-25 Ewald Hew + + [cff] Move and rename `CFF_Driver'. + + This is so that we can use the same hinting engine parameters for + Type 1. + + * include/freetype/internal/cffotypes.h (CFF_Driver): Rename and + move to... + * include/freetype/internal/psaux.h (PS_Driver): ...here. + + * src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffload.c, + src/cff/cffobjs.c, src/cff/cffobjs.h, src/psaux/psft.c, + src/psaux/psobjs.c: Update references. + 2017-09-25 Ewald Hew [psaux, type1] Reorganize object fields. diff --git a/include/freetype/internal/cffotypes.h b/include/freetype/internal/cffotypes.h index 6cabaff17..32f7d32ad 100644 --- a/include/freetype/internal/cffotypes.h +++ b/include/freetype/internal/cffotypes.h @@ -12,16 +12,6 @@ FT_BEGIN_HEADER - /*************************************************************************/ - /* */ - /* */ - /* CFF_Driver */ - /* */ - /* */ - /* A handle to an OpenType driver object. */ - /* */ - typedef struct CFF_DriverRec_* CFF_Driver; - typedef TT_Face CFF_Face; @@ -91,22 +81,6 @@ FT_BEGIN_HEADER } CFF_Transform; - /***********************************************************************/ - /* */ - /* CFF driver class. */ - /* */ - typedef struct CFF_DriverRec_ - { - FT_DriverRec root; - - FT_UInt hinting_engine; - FT_Bool no_stem_darkening; - FT_Int darken_params[8]; - FT_Int32 random_seed; - - } CFF_DriverRec; - - FT_END_HEADER diff --git a/include/freetype/internal/psaux.h b/include/freetype/internal/psaux.h index bde0bfac2..24c02e779 100644 --- a/include/freetype/internal/psaux.h +++ b/include/freetype/internal/psaux.h @@ -35,6 +35,22 @@ FT_BEGIN_HEADER + /***********************************************************************/ + /* */ + /* PostScript modules driver class. */ + /* */ + typedef struct PS_DriverRec_ + { + FT_DriverRec root; + + FT_UInt hinting_engine; + FT_Bool no_stem_darkening; + FT_Int darken_params[8]; + FT_Int32 random_seed; + + } PS_DriverRec, *PS_Driver; + + /*************************************************************************/ /*************************************************************************/ /***** *****/ diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c index 4c9b1cd99..419cdfdcb 100644 --- a/src/cff/cffdrivr.c +++ b/src/cff/cffdrivr.c @@ -21,6 +21,7 @@ #include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_STREAM_H #include FT_INTERNAL_SFNT_H +#include FT_INTERNAL_POSTSCRIPT_AUX_H #include FT_SERVICE_CID_H #include FT_SERVICE_POSTSCRIPT_INFO_H #include FT_SERVICE_POSTSCRIPT_NAME_H @@ -744,7 +745,7 @@ FT_Bool value_is_string ) { FT_Error error = FT_Err_Ok; - CFF_Driver driver = (CFF_Driver)module; + PS_Driver driver = (PS_Driver)module; #ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES FT_UNUSED( value_is_string ); @@ -910,7 +911,7 @@ const void* value ) { FT_Error error = FT_Err_Ok; - CFF_Driver driver = (CFF_Driver)module; + PS_Driver driver = (PS_Driver)module; if ( !ft_strcmp( property_name, "darkening-parameters" ) ) @@ -1229,7 +1230,7 @@ FT_MODULE_DRIVER_HAS_HINTER | FT_MODULE_DRIVER_HINTS_LIGHTLY, - sizeof ( CFF_DriverRec ), + sizeof ( PS_DriverRec ), "cff", 0x10000L, 0x20000L, diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c index 12c8097d1..917fb3ad8 100644 --- a/src/cff/cffgload.c +++ b/src/cff/cffgload.c @@ -395,7 +395,7 @@ { #ifdef CFF_CONFIG_OPTION_OLD_ENGINE - CFF_Driver driver = (CFF_Driver)FT_FACE_DRIVER( face ); + PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( face ); #endif diff --git a/src/cff/cffload.c b/src/cff/cffload.c index 5e6839d6c..21dd42366 100644 --- a/src/cff/cffload.c +++ b/src/cff/cffload.c @@ -2075,7 +2075,7 @@ */ if ( face->root.internal->random_seed == -1 ) { - CFF_Driver driver = (CFF_Driver)FT_FACE_DRIVER( face ); + PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( face ); subfont->random = (FT_UInt32)driver->random_seed; diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c index f9013e772..29a14f954 100644 --- a/src/cff/cffobjs.c +++ b/src/cff/cffobjs.c @@ -1183,7 +1183,7 @@ FT_LOCAL_DEF( FT_Error ) cff_driver_init( FT_Module module ) /* CFF_Driver */ { - CFF_Driver driver = (CFF_Driver)module; + PS_Driver driver = (PS_Driver)module; FT_UInt32 seed; diff --git a/src/cff/cffobjs.h b/src/cff/cffobjs.h index 839a61c44..9f3dff3e5 100644 --- a/src/cff/cffobjs.h +++ b/src/cff/cffobjs.h @@ -71,10 +71,10 @@ FT_BEGIN_HEADER /* Driver functions */ /* */ FT_LOCAL( FT_Error ) - cff_driver_init( FT_Module module ); /* CFF_Driver */ + cff_driver_init( FT_Module module ); /* PS_Driver */ FT_LOCAL( void ) - cff_driver_done( FT_Module module ); /* CFF_Driver */ + cff_driver_done( FT_Module module ); /* PS_Driver */ FT_END_HEADER diff --git a/src/psaux/psft.c b/src/psaux/psft.c index 25d4a4018..c91fedd28 100644 --- a/src/psaux/psft.c +++ b/src/psaux/psft.c @@ -350,7 +350,7 @@ /* build parameters for Adobe engine */ PS_Builder* builder = &decoder->builder; - CFF_Driver driver = (CFF_Driver)FT_FACE_DRIVER( builder->face ); + PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( builder->face ); FT_Bool no_stem_darkening_driver = driver->no_stem_darkening; diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c index dcb34747a..eecbda65e 100644 --- a/src/psaux/psobjs.c +++ b/src/psaux/psobjs.c @@ -1888,7 +1888,7 @@ FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points; #ifdef CFF_CONFIG_OPTION_OLD_ENGINE - CFF_Driver driver = (CFF_Driver)FT_FACE_DRIVER( builder->face ); + PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( builder->face ); if ( driver->hinting_engine == FT_CFF_HINTING_FREETYPE ) @@ -2161,7 +2161,7 @@ FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points; #ifdef CFF_CONFIG_OPTION_OLD_ENGINE - CFF_Driver driver = (CFF_Driver)FT_FACE_DRIVER( builder->face ); + PS_Driver driver = (PS_Driver)FT_FACE_DRIVER( builder->face ); if ( driver->hinting_engine == FT_CFF_HINTING_FREETYPE )