Use the new objects.

* include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Fix
switching between new and old engines.

* src/cff/cffgload.c, src/cff/cffparse.c: Update calls.

* src/psaux/psblues.c, src/psaux/psfont.c, src/psaux/psfont.h,
src/psaux/psft.c, src/psaux/psft.h, src/psaux/psintrp.c: Update all
to use new objects.
This commit is contained in:
Ewald Hew 2017-09-25 06:10:20 +02:00 committed by Werner Lemberg
parent 43c015823f
commit 0589e3c012
11 changed files with 176 additions and 152 deletions

View File

@ -1,3 +1,16 @@
2017-09-25 Ewald Hew <ewaldhew@gmail.com>
[psaux, cff] Use the new objects.
* include/freetype/internal/psaux.h, src/psaux/psauxmod.c: Fix
switching between new and old engines.
* src/cff/cffgload.c, src/cff/cffparse.c: Update calls.
* src/psaux/psblues.c, src/psaux/psfont.c, src/psaux/psfont.h,
src/psaux/psft.c, src/psaux/psft.h, src/psaux/psintrp.c: Update all
to use new objects.
2017-09-24 Ewald Hew <ewaldhew@gmail.com> 2017-09-24 Ewald Hew <ewaldhew@gmail.com>
[psaux] Objects for new interpreter (part 2). [psaux] Objects for new interpreter (part 2).

View File

@ -1137,18 +1137,22 @@ FT_BEGIN_HEADER
CFF_Size size, CFF_Size size,
FT_UInt glyph_index ); FT_UInt glyph_index );
FT_Error
(*parse_charstrings)( CFF_Decoder* decoder,
FT_Byte* charstring_base,
FT_ULong charstring_len
#ifdef CFF_CONFIG_OPTION_OLD_ENGINE #ifdef CFF_CONFIG_OPTION_OLD_ENGINE
/*TODO(ewaldhew): seems hacky, is there a better way to do this?*/ FT_Error
,FT_Bool in_dict (*parse_charstrings_old)( CFF_Decoder* decoder,
FT_Byte* charstring_base,
FT_ULong charstring_len,
FT_Bool in_dict );
#endif #endif
);
FT_Error
(*parse_charstrings)( PS_Decoder* decoder,
FT_Byte* charstring_base,
FT_ULong charstring_len );
} CFF_Decoder_FuncsRec; } CFF_Decoder_FuncsRec;
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
/***** *****/ /***** *****/

View File

@ -169,7 +169,7 @@
{ {
error = decoder_funcs->prepare( &decoder, size, glyph_index ); error = decoder_funcs->prepare( &decoder, size, glyph_index );
if ( !error ) if ( !error )
error = decoder_funcs->parse_charstrings( &decoder, error = decoder_funcs->parse_charstrings_old( &decoder,
charstring, charstring,
charstring_len, charstring_len,
0 ); 0 );
@ -198,6 +198,7 @@
{ {
FT_Error error; FT_Error error;
CFF_Decoder decoder; CFF_Decoder decoder;
PS_Decoder psdecoder;
TT_Face face = (TT_Face)glyph->root.face; TT_Face face = (TT_Face)glyph->root.face;
FT_Bool hinting, scaled, force_scaling; FT_Bool hinting, scaled, force_scaling;
CFF_Font cff = (CFF_Font)face->extra.data; CFF_Font cff = (CFF_Font)face->extra.data;
@ -427,14 +428,16 @@
#ifdef CFF_CONFIG_OPTION_OLD_ENGINE #ifdef CFF_CONFIG_OPTION_OLD_ENGINE
/* choose which CFF renderer to use */ /* choose which CFF renderer to use */
if ( driver->hinting_engine == FT_CFF_HINTING_FREETYPE ) if ( driver->hinting_engine == FT_CFF_HINTING_FREETYPE )
error = decoder_funcs->parse_charstrings( &decoder, error = decoder_funcs->parse_charstrings_old( &decoder,
charstring, charstring,
charstring_len, charstring_len,
0 ); 0 );
else else
#endif #endif
{ {
error = decoder_funcs->parse_charstrings( &decoder, psaux->ps_decoder_init( &decoder, FALSE, &psdecoder );
error = decoder_funcs->parse_charstrings( &psdecoder,
charstring, charstring,
charstring_len ); charstring_len );
@ -449,7 +452,7 @@
force_scaling = TRUE; force_scaling = TRUE;
glyph->hint = hinting; glyph->hint = hinting;
error = decoder_funcs->parse_charstrings( &decoder, error = decoder_funcs->parse_charstrings( &psdecoder,
charstring, charstring,
charstring_len ); charstring_len );
} }

View File

@ -1299,6 +1299,11 @@
FT_Byte* start, FT_Byte* start,
FT_Byte* limit ) FT_Byte* limit )
{ {
#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
PSAux_Service psaux;
#endif
FT_Byte* p = start; FT_Byte* p = start;
FT_Error error = FT_Err_Ok; FT_Error error = FT_Err_Ok;
FT_Library library = parser->library; FT_Library library = parser->library;
@ -1398,7 +1403,7 @@
goto Exit; goto Exit;
} }
error = psaux->cff_decoder_funcs->parse_charstrings( &decoder, error = psaux->cff_decoder_funcs->parse_charstrings_old( &decoder,
charstring_base, charstring_base,
charstring_len, charstring_len,
1 ); 1 );

View File

@ -137,10 +137,9 @@
cff_decoder_prepare, /* prepare */ cff_decoder_prepare, /* prepare */
#ifdef CFF_CONFIG_OPTION_OLD_ENGINE #ifdef CFF_CONFIG_OPTION_OLD_ENGINE
cff_decoder_parse_charstrings /* parse_charstrings */ cff_decoder_parse_charstrings, /* parse_charstrings_old */
#else
cf2_decoder_parse_charstrings
#endif #endif
cf2_decoder_parse_charstrings /* parse_charstrings */
}; };

View File

@ -67,7 +67,7 @@
CF2_Font font ) CF2_Font font )
{ {
/* pointer to parsed font object */ /* pointer to parsed font object */
CFF_Decoder* decoder = font->decoder; PS_Decoder* decoder = font->decoder;
CF2_Fixed zoneHeight; CF2_Fixed zoneHeight;
CF2_Fixed maxZoneHeight = 0; CF2_Fixed maxZoneHeight = 0;

View File

@ -243,7 +243,7 @@
const CF2_Matrix* transform ) const CF2_Matrix* transform )
{ {
/* pointer to parsed font object */ /* pointer to parsed font object */
CFF_Decoder* decoder = font->decoder; PS_Decoder* decoder = font->decoder;
FT_Bool needExtraSetup = FALSE; FT_Bool needExtraSetup = FALSE;

View File

@ -90,7 +90,7 @@ FT_BEGIN_HEADER
/* FreeType related members */ /* FreeType related members */
CF2_OutlineRec outline; /* freetype glyph outline functions */ CF2_OutlineRec outline; /* freetype glyph outline functions */
CFF_Decoder* decoder; PS_Decoder* decoder;
CFF_SubFont lastSubfont; /* FreeType parsed data; */ CFF_SubFont lastSubfont; /* FreeType parsed data; */
/* top font or subfont */ /* top font or subfont */

View File

@ -89,7 +89,7 @@
cf2_setGlyphWidth( CF2_Outline outline, cf2_setGlyphWidth( CF2_Outline outline,
CF2_Fixed width ) CF2_Fixed width )
{ {
CFF_Decoder* decoder = outline->decoder; PS_Decoder* decoder = outline->decoder;
FT_ASSERT( decoder ); FT_ASSERT( decoder );
@ -129,7 +129,7 @@
{ {
/* downcast the object pointer */ /* downcast the object pointer */
CF2_Outline outline = (CF2_Outline)callbacks; CF2_Outline outline = (CF2_Outline)callbacks;
CFF_Builder* builder; PS_Builder* builder;
(void)params; /* only used in debug mode */ (void)params; /* only used in debug mode */
@ -140,7 +140,7 @@
builder = &outline->decoder->builder; builder = &outline->decoder->builder;
/* note: two successive moves simply close the contour twice */ /* note: two successive moves simply close the contour twice */
cff_builder_close_contour( builder ); ps_builder_close_contour( builder );
builder->path_begun = 0; builder->path_begun = 0;
} }
@ -153,7 +153,7 @@
/* downcast the object pointer */ /* downcast the object pointer */
CF2_Outline outline = (CF2_Outline)callbacks; CF2_Outline outline = (CF2_Outline)callbacks;
CFF_Builder* builder; PS_Builder* builder;
FT_ASSERT( outline && outline->decoder ); FT_ASSERT( outline && outline->decoder );
@ -165,7 +165,7 @@
{ {
/* record the move before the line; also check points and set */ /* record the move before the line; also check points and set */
/* `path_begun' */ /* `path_begun' */
error = cff_builder_start_point( builder, error = ps_builder_start_point( builder,
params->pt0.x, params->pt0.x,
params->pt0.y ); params->pt0.y );
if ( error ) if ( error )
@ -176,8 +176,8 @@
} }
} }
/* `cff_builder_add_point1' includes a check_points call for one point */ /* `ps_builder_add_point1' includes a check_points call for one point */
error = cff_builder_add_point1( builder, error = ps_builder_add_point1( builder,
params->pt1.x, params->pt1.x,
params->pt1.y ); params->pt1.y );
if ( error ) if ( error )
@ -197,7 +197,7 @@
/* downcast the object pointer */ /* downcast the object pointer */
CF2_Outline outline = (CF2_Outline)callbacks; CF2_Outline outline = (CF2_Outline)callbacks;
CFF_Builder* builder; PS_Builder* builder;
FT_ASSERT( outline && outline->decoder ); FT_ASSERT( outline && outline->decoder );
@ -209,7 +209,7 @@
{ {
/* record the move before the line; also check points and set */ /* record the move before the line; also check points and set */
/* `path_begun' */ /* `path_begun' */
error = cff_builder_start_point( builder, error = ps_builder_start_point( builder,
params->pt0.x, params->pt0.x,
params->pt0.y ); params->pt0.y );
if ( error ) if ( error )
@ -221,7 +221,7 @@
} }
/* prepare room for 3 points: 2 off-curve, 1 on-curve */ /* prepare room for 3 points: 2 off-curve, 1 on-curve */
error = cff_check_points( builder, 3 ); error = ps_builder_check_points( builder, 3 );
if ( error ) if ( error )
{ {
if ( !*callbacks->error ) if ( !*callbacks->error )
@ -229,13 +229,13 @@
return; return;
} }
cff_builder_add_point( builder, ps_builder_add_point( builder,
params->pt1.x, params->pt1.x,
params->pt1.y, 0 ); params->pt1.y, 0 );
cff_builder_add_point( builder, ps_builder_add_point( builder,
params->pt2.x, params->pt2.x,
params->pt2.y, 0 ); params->pt2.y, 0 );
cff_builder_add_point( builder, ps_builder_add_point( builder,
params->pt3.x, params->pt3.x,
params->pt3.y, 1 ); params->pt3.y, 1 );
} }
@ -259,7 +259,7 @@
/* get scaling and hint flag from GlyphSlot */ /* get scaling and hint flag from GlyphSlot */
static void static void
cf2_getScaleAndHintFlag( CFF_Decoder* decoder, cf2_getScaleAndHintFlag( PS_Decoder* decoder,
CF2_Fixed* x_scale, CF2_Fixed* x_scale,
CF2_Fixed* y_scale, CF2_Fixed* y_scale,
FT_Bool* hinted, FT_Bool* hinted,
@ -290,7 +290,7 @@
/* get units per em from `FT_Face' */ /* get units per em from `FT_Face' */
/* TODO: should handle font matrix concatenation? */ /* TODO: should handle font matrix concatenation? */
static FT_UShort static FT_UShort
cf2_getUnitsPerEm( CFF_Decoder* decoder ) cf2_getUnitsPerEm( PS_Decoder* decoder )
{ {
FT_ASSERT( decoder && decoder->builder.face ); FT_ASSERT( decoder && decoder->builder.face );
FT_ASSERT( decoder->builder.face->root.units_per_EM ); FT_ASSERT( decoder->builder.face->root.units_per_EM );
@ -301,7 +301,7 @@
/* Main entry point: Render one glyph. */ /* Main entry point: Render one glyph. */
FT_LOCAL_DEF( FT_Error ) FT_LOCAL_DEF( FT_Error )
cf2_decoder_parse_charstrings( CFF_Decoder* decoder, cf2_decoder_parse_charstrings( PS_Decoder* decoder,
FT_Byte* charstring_base, FT_Byte* charstring_base,
FT_ULong charstring_len ) FT_ULong charstring_len )
{ {
@ -344,7 +344,7 @@
{ {
/* build parameters for Adobe engine */ /* build parameters for Adobe engine */
CFF_Builder* builder = &decoder->builder; PS_Builder* builder = &decoder->builder;
CFF_Driver driver = (CFF_Driver)FT_FACE_DRIVER( builder->face ); CFF_Driver driver = (CFF_Driver)FT_FACE_DRIVER( builder->face );
FT_Bool no_stem_darkening_driver = FT_Bool no_stem_darkening_driver =
@ -423,7 +423,7 @@
/* get pointer to current FreeType subfont (based on current glyphID) */ /* get pointer to current FreeType subfont (based on current glyphID) */
FT_LOCAL_DEF( CFF_SubFont ) FT_LOCAL_DEF( CFF_SubFont )
cf2_getSubfont( CFF_Decoder* decoder ) cf2_getSubfont( PS_Decoder* decoder )
{ {
FT_ASSERT( decoder && decoder->current_subfont ); FT_ASSERT( decoder && decoder->current_subfont );
@ -433,7 +433,7 @@
/* get pointer to VStore structure */ /* get pointer to VStore structure */
FT_LOCAL_DEF( CFF_VStore ) FT_LOCAL_DEF( CFF_VStore )
cf2_getVStore( CFF_Decoder* decoder ) cf2_getVStore( PS_Decoder* decoder )
{ {
FT_ASSERT( decoder && decoder->cff ); FT_ASSERT( decoder && decoder->cff );
@ -443,7 +443,7 @@
/* get maxstack value from CFF2 Top DICT */ /* get maxstack value from CFF2 Top DICT */
FT_LOCAL_DEF( FT_UInt ) FT_LOCAL_DEF( FT_UInt )
cf2_getMaxstack( CFF_Decoder* decoder ) cf2_getMaxstack( PS_Decoder* decoder )
{ {
FT_ASSERT( decoder && decoder->cff ); FT_ASSERT( decoder && decoder->cff );
@ -457,7 +457,7 @@
/* */ /* */
/* Note: Uses FT_Fixed not CF2_Fixed for the vector. */ /* Note: Uses FT_Fixed not CF2_Fixed for the vector. */
FT_LOCAL_DEF( FT_Error ) FT_LOCAL_DEF( FT_Error )
cf2_getNormalizedVector( CFF_Decoder* decoder, cf2_getNormalizedVector( PS_Decoder* decoder,
CF2_UInt *len, CF2_UInt *len,
FT_Fixed* *vec ) FT_Fixed* *vec )
{ {
@ -477,7 +477,7 @@
/* get `y_ppem' from `CFF_Size' */ /* get `y_ppem' from `CFF_Size' */
FT_LOCAL_DEF( CF2_Fixed ) FT_LOCAL_DEF( CF2_Fixed )
cf2_getPpemY( CFF_Decoder* decoder ) cf2_getPpemY( PS_Decoder* decoder )
{ {
FT_ASSERT( decoder && FT_ASSERT( decoder &&
decoder->builder.face && decoder->builder.face &&
@ -501,7 +501,7 @@
/* FreeType stores these as integer font units */ /* FreeType stores these as integer font units */
/* (note: variable names seem swapped) */ /* (note: variable names seem swapped) */
FT_LOCAL_DEF( CF2_Fixed ) FT_LOCAL_DEF( CF2_Fixed )
cf2_getStdVW( CFF_Decoder* decoder ) cf2_getStdVW( PS_Decoder* decoder )
{ {
FT_ASSERT( decoder && decoder->current_subfont ); FT_ASSERT( decoder && decoder->current_subfont );
@ -511,7 +511,7 @@
FT_LOCAL_DEF( CF2_Fixed ) FT_LOCAL_DEF( CF2_Fixed )
cf2_getStdHW( CFF_Decoder* decoder ) cf2_getStdHW( PS_Decoder* decoder )
{ {
FT_ASSERT( decoder && decoder->current_subfont ); FT_ASSERT( decoder && decoder->current_subfont );
@ -522,7 +522,7 @@
/* note: FreeType stores 1000 times the actual value for `BlueScale' */ /* note: FreeType stores 1000 times the actual value for `BlueScale' */
FT_LOCAL_DEF( void ) FT_LOCAL_DEF( void )
cf2_getBlueMetrics( CFF_Decoder* decoder, cf2_getBlueMetrics( PS_Decoder* decoder,
CF2_Fixed* blueScale, CF2_Fixed* blueScale,
CF2_Fixed* blueShift, CF2_Fixed* blueShift,
CF2_Fixed* blueFuzz ) CF2_Fixed* blueFuzz )
@ -542,7 +542,7 @@
/* get blue values counts and arrays; the FreeType parser has validated */ /* get blue values counts and arrays; the FreeType parser has validated */
/* the counts and verified that each is an even number */ /* the counts and verified that each is an even number */
FT_LOCAL_DEF( void ) FT_LOCAL_DEF( void )
cf2_getBlueValues( CFF_Decoder* decoder, cf2_getBlueValues( PS_Decoder* decoder,
size_t* count, size_t* count,
FT_Pos* *data ) FT_Pos* *data )
{ {
@ -555,7 +555,7 @@
FT_LOCAL_DEF( void ) FT_LOCAL_DEF( void )
cf2_getOtherBlues( CFF_Decoder* decoder, cf2_getOtherBlues( PS_Decoder* decoder,
size_t* count, size_t* count,
FT_Pos* *data ) FT_Pos* *data )
{ {
@ -568,7 +568,7 @@
FT_LOCAL_DEF( void ) FT_LOCAL_DEF( void )
cf2_getFamilyBlues( CFF_Decoder* decoder, cf2_getFamilyBlues( PS_Decoder* decoder,
size_t* count, size_t* count,
FT_Pos* *data ) FT_Pos* *data )
{ {
@ -581,7 +581,7 @@
FT_LOCAL_DEF( void ) FT_LOCAL_DEF( void )
cf2_getFamilyOtherBlues( CFF_Decoder* decoder, cf2_getFamilyOtherBlues( PS_Decoder* decoder,
size_t* count, size_t* count,
FT_Pos* *data ) FT_Pos* *data )
{ {
@ -594,7 +594,7 @@
FT_LOCAL_DEF( CF2_Int ) FT_LOCAL_DEF( CF2_Int )
cf2_getLanguageGroup( CFF_Decoder* decoder ) cf2_getLanguageGroup( PS_Decoder* decoder )
{ {
FT_ASSERT( decoder && decoder->current_subfont ); FT_ASSERT( decoder && decoder->current_subfont );
@ -605,7 +605,7 @@
/* convert unbiased subroutine index to `CF2_Buffer' and */ /* convert unbiased subroutine index to `CF2_Buffer' and */
/* return 0 on success */ /* return 0 on success */
FT_LOCAL_DEF( CF2_Int ) FT_LOCAL_DEF( CF2_Int )
cf2_initGlobalRegionBuffer( CFF_Decoder* decoder, cf2_initGlobalRegionBuffer( PS_Decoder* decoder,
CF2_Int subrNum, CF2_Int subrNum,
CF2_Buffer buf ) CF2_Buffer buf )
{ {
@ -633,7 +633,7 @@
/* convert AdobeStandardEncoding code to CF2_Buffer; */ /* convert AdobeStandardEncoding code to CF2_Buffer; */
/* used for seac component */ /* used for seac component */
FT_LOCAL_DEF( FT_Error ) FT_LOCAL_DEF( FT_Error )
cf2_getSeacComponent( CFF_Decoder* decoder, cf2_getSeacComponent( PS_Decoder* decoder,
CF2_Int code, CF2_Int code,
CF2_Buffer buf ) CF2_Buffer buf )
{ {
@ -680,7 +680,7 @@
FT_LOCAL_DEF( void ) FT_LOCAL_DEF( void )
cf2_freeSeacComponent( CFF_Decoder* decoder, cf2_freeSeacComponent( PS_Decoder* decoder,
CF2_Buffer buf ) CF2_Buffer buf )
{ {
FT_ASSERT( decoder ); FT_ASSERT( decoder );
@ -692,7 +692,7 @@
FT_LOCAL_DEF( CF2_Int ) FT_LOCAL_DEF( CF2_Int )
cf2_initLocalRegionBuffer( CFF_Decoder* decoder, cf2_initLocalRegionBuffer( PS_Decoder* decoder,
CF2_Int subrNum, CF2_Int subrNum,
CF2_Buffer buf ) CF2_Buffer buf )
{ {
@ -718,7 +718,7 @@
FT_LOCAL_DEF( CF2_Fixed ) FT_LOCAL_DEF( CF2_Fixed )
cf2_getDefaultWidthX( CFF_Decoder* decoder ) cf2_getDefaultWidthX( PS_Decoder* decoder )
{ {
FT_ASSERT( decoder && decoder->current_subfont ); FT_ASSERT( decoder && decoder->current_subfont );
@ -728,7 +728,7 @@
FT_LOCAL_DEF( CF2_Fixed ) FT_LOCAL_DEF( CF2_Fixed )
cf2_getNominalWidthX( CFF_Decoder* decoder ) cf2_getNominalWidthX( PS_Decoder* decoder )
{ {
FT_ASSERT( decoder && decoder->current_subfont ); FT_ASSERT( decoder && decoder->current_subfont );
@ -740,7 +740,7 @@
FT_LOCAL_DEF( void ) FT_LOCAL_DEF( void )
cf2_outline_reset( CF2_Outline outline ) cf2_outline_reset( CF2_Outline outline )
{ {
CFF_Decoder* decoder = outline->decoder; PS_Decoder* decoder = outline->decoder;
FT_ASSERT( decoder ); FT_ASSERT( decoder );
@ -754,12 +754,12 @@
FT_LOCAL_DEF( void ) FT_LOCAL_DEF( void )
cf2_outline_close( CF2_Outline outline ) cf2_outline_close( CF2_Outline outline )
{ {
CFF_Decoder* decoder = outline->decoder; PS_Decoder* decoder = outline->decoder;
FT_ASSERT( decoder ); FT_ASSERT( decoder );
cff_builder_close_contour( &decoder->builder ); ps_builder_close_contour( &decoder->builder );
FT_GlyphLoader_Add( decoder->builder.loader ); FT_GlyphLoader_Add( decoder->builder.loader );
} }

View File

@ -50,85 +50,85 @@
#include FT_SYSTEM_H #include FT_SYSTEM_H
#include "psglue.h" #include "psglue.h"
#include FT_INTERNAL_POSTSCRIPT_AUX_H /* for CFF_Decoder */ #include FT_INTERNAL_POSTSCRIPT_AUX_H /* for PS_Decoder */
FT_BEGIN_HEADER FT_BEGIN_HEADER
FT_LOCAL( FT_Error ) FT_LOCAL( FT_Error )
cf2_decoder_parse_charstrings( CFF_Decoder* decoder, cf2_decoder_parse_charstrings( PS_Decoder* decoder,
FT_Byte* charstring_base, FT_Byte* charstring_base,
FT_ULong charstring_len ); FT_ULong charstring_len );
FT_LOCAL( CFF_SubFont ) FT_LOCAL( CFF_SubFont )
cf2_getSubfont( CFF_Decoder* decoder ); cf2_getSubfont( PS_Decoder* decoder );
FT_LOCAL( CFF_VStore ) FT_LOCAL( CFF_VStore )
cf2_getVStore( CFF_Decoder* decoder ); cf2_getVStore( PS_Decoder* decoder );
FT_LOCAL( FT_UInt ) FT_LOCAL( FT_UInt )
cf2_getMaxstack( CFF_Decoder* decoder ); cf2_getMaxstack( PS_Decoder* decoder );
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
FT_LOCAL( FT_Error ) FT_LOCAL( FT_Error )
cf2_getNormalizedVector( CFF_Decoder* decoder, cf2_getNormalizedVector( PS_Decoder* decoder,
CF2_UInt *len, CF2_UInt *len,
FT_Fixed* *vec ); FT_Fixed* *vec );
#endif #endif
FT_LOCAL( CF2_Fixed ) FT_LOCAL( CF2_Fixed )
cf2_getPpemY( CFF_Decoder* decoder ); cf2_getPpemY( PS_Decoder* decoder );
FT_LOCAL( CF2_Fixed ) FT_LOCAL( CF2_Fixed )
cf2_getStdVW( CFF_Decoder* decoder ); cf2_getStdVW( PS_Decoder* decoder );
FT_LOCAL( CF2_Fixed ) FT_LOCAL( CF2_Fixed )
cf2_getStdHW( CFF_Decoder* decoder ); cf2_getStdHW( PS_Decoder* decoder );
FT_LOCAL( void ) FT_LOCAL( void )
cf2_getBlueMetrics( CFF_Decoder* decoder, cf2_getBlueMetrics( PS_Decoder* decoder,
CF2_Fixed* blueScale, CF2_Fixed* blueScale,
CF2_Fixed* blueShift, CF2_Fixed* blueShift,
CF2_Fixed* blueFuzz ); CF2_Fixed* blueFuzz );
FT_LOCAL( void ) FT_LOCAL( void )
cf2_getBlueValues( CFF_Decoder* decoder, cf2_getBlueValues( PS_Decoder* decoder,
size_t* count, size_t* count,
FT_Pos* *data ); FT_Pos* *data );
FT_LOCAL( void ) FT_LOCAL( void )
cf2_getOtherBlues( CFF_Decoder* decoder, cf2_getOtherBlues( PS_Decoder* decoder,
size_t* count, size_t* count,
FT_Pos* *data ); FT_Pos* *data );
FT_LOCAL( void ) FT_LOCAL( void )
cf2_getFamilyBlues( CFF_Decoder* decoder, cf2_getFamilyBlues( PS_Decoder* decoder,
size_t* count, size_t* count,
FT_Pos* *data ); FT_Pos* *data );
FT_LOCAL( void ) FT_LOCAL( void )
cf2_getFamilyOtherBlues( CFF_Decoder* decoder, cf2_getFamilyOtherBlues( PS_Decoder* decoder,
size_t* count, size_t* count,
FT_Pos* *data ); FT_Pos* *data );
FT_LOCAL( CF2_Int ) FT_LOCAL( CF2_Int )
cf2_getLanguageGroup( CFF_Decoder* decoder ); cf2_getLanguageGroup( PS_Decoder* decoder );
FT_LOCAL( CF2_Int ) FT_LOCAL( CF2_Int )
cf2_initGlobalRegionBuffer( CFF_Decoder* decoder, cf2_initGlobalRegionBuffer( PS_Decoder* decoder,
CF2_Int subrNum, CF2_Int subrNum,
CF2_Buffer buf ); CF2_Buffer buf );
FT_LOCAL( FT_Error ) FT_LOCAL( FT_Error )
cf2_getSeacComponent( CFF_Decoder* decoder, cf2_getSeacComponent( PS_Decoder* decoder,
CF2_Int code, CF2_Int code,
CF2_Buffer buf ); CF2_Buffer buf );
FT_LOCAL( void ) FT_LOCAL( void )
cf2_freeSeacComponent( CFF_Decoder* decoder, cf2_freeSeacComponent( PS_Decoder* decoder,
CF2_Buffer buf ); CF2_Buffer buf );
FT_LOCAL( CF2_Int ) FT_LOCAL( CF2_Int )
cf2_initLocalRegionBuffer( CFF_Decoder* decoder, cf2_initLocalRegionBuffer( PS_Decoder* decoder,
CF2_Int subrNum, CF2_Int subrNum,
CF2_Buffer buf ); CF2_Buffer buf );
FT_LOCAL( CF2_Fixed ) FT_LOCAL( CF2_Fixed )
cf2_getDefaultWidthX( CFF_Decoder* decoder ); cf2_getDefaultWidthX( PS_Decoder* decoder );
FT_LOCAL( CF2_Fixed ) FT_LOCAL( CF2_Fixed )
cf2_getNominalWidthX( CFF_Decoder* decoder ); cf2_getNominalWidthX( PS_Decoder* decoder );
/* /*
@ -139,7 +139,7 @@ FT_BEGIN_HEADER
typedef struct CF2_OutlineRec_ typedef struct CF2_OutlineRec_
{ {
CF2_OutlineCallbacksRec root; /* base class must be first */ CF2_OutlineCallbacksRec root; /* base class must be first */
CFF_Decoder* decoder; PS_Decoder* decoder;
} CF2_OutlineRec, *CF2_Outline; } CF2_OutlineRec, *CF2_Outline;

View File

@ -476,7 +476,7 @@
FT_Error lastError = FT_Err_Ok; FT_Error lastError = FT_Err_Ok;
/* pointer to parsed font object */ /* pointer to parsed font object */
CFF_Decoder* decoder = font->decoder; PS_Decoder* decoder = font->decoder;
FT_Error* error = &font->error; FT_Error* error = &font->error;
FT_Memory memory = font->memory; FT_Memory memory = font->memory;