diff options
Diffstat (limited to 'freetype/src/cff/cffobjs.c')
-rw-r--r-- | freetype/src/cff/cffobjs.c | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/freetype/src/cff/cffobjs.c b/freetype/src/cff/cffobjs.c index 85ef89d97..55fa950f3 100644 --- a/freetype/src/cff/cffobjs.c +++ b/freetype/src/cff/cffobjs.c @@ -4,7 +4,7 @@ /* */ /* OpenType objects manager (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -30,6 +30,7 @@ #include "cffload.h" #include "cffcmap.h" #include "cfferrs.h" +#include "cffpic.h" /*************************************************************************/ @@ -223,8 +224,8 @@ CFF_Font font = (CFF_Font)face->extra.data; CFF_Internal internal = (CFF_Internal)size->internal; - FT_Int top_upm = font->top_font.font_dict.units_per_em; - FT_UInt i; + FT_ULong top_upm = font->top_font.font_dict.units_per_em; + FT_UInt i; funcs->set_scale( internal->topfont, @@ -234,7 +235,7 @@ for ( i = font->num_subfonts; i > 0; i-- ) { CFF_SubFont sub = font->subfonts[i - 1]; - FT_Int sub_upm = sub->font_dict.units_per_em; + FT_ULong sub_upm = sub->font_dict.units_per_em; FT_Pos x_scale, y_scale; @@ -295,8 +296,8 @@ CFF_Font font = (CFF_Font)cffface->extra.data; CFF_Internal internal = (CFF_Internal)size->internal; - FT_Int top_upm = font->top_font.font_dict.units_per_em; - FT_UInt i; + FT_ULong top_upm = font->top_font.font_dict.units_per_em; + FT_UInt i; funcs->set_scale( internal->topfont, @@ -306,7 +307,7 @@ for ( i = font->num_subfonts; i > 0; i-- ) { CFF_SubFont sub = font->subfonts[i - 1]; - FT_Int sub_upm = sub->font_dict.units_per_em; + FT_ULong sub_upm = sub->font_dict.units_per_em; FT_Pos x_scale, y_scale; @@ -408,6 +409,7 @@ PSHinter_Service pshinter; FT_Bool pure_cff = 1; FT_Bool sfnt_format = 0; + FT_Library library = cffface->driver->root.library; #if 0 @@ -419,14 +421,14 @@ goto Bad_Format; #else sfnt = (SFNT_Service)FT_Get_Module_Interface( - cffface->driver->root.library, "sfnt" ); + library, "sfnt" ); if ( !sfnt ) goto Bad_Format; FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS ); pshinter = (PSHinter_Service)FT_Get_Module_Interface( - cffface->driver->root.library, "pshinter" ); + library, "pshinter" ); #endif /* create input stream from resource */ @@ -507,7 +509,7 @@ goto Exit; face->extra.data = cff; - error = cff_font_load( stream, face_index, cff, pure_cff ); + error = cff_font_load( library, stream, face_index, cff, pure_cff ); if ( error ) goto Exit; @@ -528,10 +530,10 @@ /* which aren't CID-keyed */ if ( dict->cid_registry == 0xFFFFU && !psnames ) { - FT_ERROR(( "cff_face_init:" )); - FT_ERROR(( " cannot open CFF & CEF fonts\n" )); - FT_ERROR(( " " )); - FT_ERROR(( " without the `PSNames' module\n" )); + FT_ERROR(( "cff_face_init:" + " cannot open CFF & CEF fonts\n" + " " + " without the `PSNames' module\n" )); goto Bad_Format; } @@ -582,7 +584,7 @@ if ( sub->units_per_em ) { - FT_Int scaling; + FT_Long scaling; if ( top->units_per_em > 1 && sub->units_per_em > 1 ) @@ -764,22 +766,22 @@ /* */ /* Compute face flags. */ /* */ - flags = FT_FACE_FLAG_SCALABLE | /* scalable outlines */ - FT_FACE_FLAG_HORIZONTAL | /* horizontal data */ - FT_FACE_FLAG_HINTER; /* has native hinter */ + flags = (FT_UInt32)( FT_FACE_FLAG_SCALABLE | /* scalable outlines */ + FT_FACE_FLAG_HORIZONTAL | /* horizontal data */ + FT_FACE_FLAG_HINTER ); /* has native hinter */ if ( sfnt_format ) - flags |= FT_FACE_FLAG_SFNT; + flags |= (FT_UInt32)FT_FACE_FLAG_SFNT; /* fixed width font? */ if ( dict->is_fixed_pitch ) - flags |= FT_FACE_FLAG_FIXED_WIDTH; + flags |= (FT_UInt32)FT_FACE_FLAG_FIXED_WIDTH; /* XXX: WE DO NOT SUPPORT KERNING METRICS IN THE GPOS TABLE FOR NOW */ #if 0 /* kerning available? */ if ( face->kern_pairs ) - flags |= FT_FACE_FLAG_KERNING; + flags |= (FT_UInt32)FT_FACE_FLAG_KERNING; #endif cffface->face_flags = flags; @@ -868,7 +870,7 @@ nn = (FT_UInt)cffface->num_charmaps; - FT_CMap_New( &cff_cmap_unicode_class_rec, NULL, &cmaprec, NULL ); + FT_CMap_New( &FT_CFF_CMAP_UNICODE_CLASS_REC_GET, NULL, &cmaprec, NULL ); /* if no Unicode charmap was previously selected, select this one */ if ( cffface->charmap == NULL && nn != (FT_UInt)cffface->num_charmaps ) @@ -887,19 +889,19 @@ { cmaprec.encoding_id = TT_ADOBE_ID_STANDARD; cmaprec.encoding = FT_ENCODING_ADOBE_STANDARD; - clazz = &cff_cmap_encoding_class_rec; + clazz = &FT_CFF_CMAP_ENCODING_CLASS_REC_GET; } else if ( encoding->offset == 1 ) { cmaprec.encoding_id = TT_ADOBE_ID_EXPERT; cmaprec.encoding = FT_ENCODING_ADOBE_EXPERT; - clazz = &cff_cmap_encoding_class_rec; + clazz = &FT_CFF_CMAP_ENCODING_CLASS_REC_GET; } else { cmaprec.encoding_id = TT_ADOBE_ID_CUSTOM; cmaprec.encoding = FT_ENCODING_ADOBE_CUSTOM; - clazz = &cff_cmap_encoding_class_rec; + clazz = &FT_CFF_CMAP_ENCODING_CLASS_REC_GET; } FT_CMap_New( clazz, NULL, &cmaprec, NULL ); |