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.
diff --git a/ChangeLog b/ChangeLog
index c75a316..d6d0be1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
2017-09-25 Ewald Hew <ewaldhew@gmail.com>
+ [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 <ewaldhew@gmail.com>
+
[psaux, type1] Reorganize object fields.
Make some fields more generic, so that we can access them the same
diff --git a/include/freetype/internal/cffotypes.h b/include/freetype/internal/cffotypes.h
index 6cabaff..32f7d32 100644
--- a/include/freetype/internal/cffotypes.h
+++ b/include/freetype/internal/cffotypes.h
@@ -12,16 +12,6 @@
FT_BEGIN_HEADER
- /*************************************************************************/
- /* */
- /* <Type> */
- /* CFF_Driver */
- /* */
- /* <Description> */
- /* A handle to an OpenType driver object. */
- /* */
- typedef struct CFF_DriverRec_* CFF_Driver;
-
typedef TT_Face CFF_Face;
@@ -91,22 +81,6 @@
} 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 bde0bfa..24c02e7 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 4c9b1cd..419cdfd 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 12c8097..917fb3a 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 5e6839d..21dd423 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 f9013e7..29a14f9 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 839a61c..9f3dff3 100644
--- a/src/cff/cffobjs.h
+++ b/src/cff/cffobjs.h
@@ -71,10 +71,10 @@
/* 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 25d4a40..c91fedd 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 dcb3474..eecbda6 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 )