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.
This commit is contained in:
parent
d23affe1ef
commit
645d1b86ad
15
ChangeLog
15
ChangeLog
@ -1,3 +1,18 @@
|
||||
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.
|
||||
|
@ -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 @@ 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
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
/***** *****/
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user