ref: 645d1b86ade211d1323f6050ec5092b684736b4e
parent: d23affe1ef8646ce51aa8d94fddccb7c89ba9a13
author: Ewald Hew <[email protected]>
date: Mon Sep 25 02:28:25 EDT 2017
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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
2017-09-25 Ewald Hew <[email protected]>
+ [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 <[email protected]>
+
[psaux, type1] Reorganize object fields.
Make some fields more generic, so that we can access them the same
--- 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;
@@ -89,22 +79,6 @@
FT_F26Dot6 ox, oy; /* offsets */
} 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
--- 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;
+
+
/*************************************************************************/
/*************************************************************************/
/***** *****/
--- 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,
--- 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
--- 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;
--- 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;
--- 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
--- 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;
--- 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 )