diff options
Diffstat (limited to 'freetype/src/type1')
-rw-r--r-- | freetype/src/type1/t1afm.c | 9 | ||||
-rw-r--r-- | freetype/src/type1/t1objs.c | 13 |
2 files changed, 13 insertions, 9 deletions
diff --git a/freetype/src/type1/t1afm.c b/freetype/src/type1/t1afm.c index 89a2bfb61..43b7118c5 100644 --- a/freetype/src/type1/t1afm.c +++ b/freetype/src/type1/t1afm.c @@ -4,7 +4,8 @@ /* */ /* AFM support for Type 1 fonts (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */ +/* 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -235,10 +236,10 @@ FT_Stream stream ) { PSAux_Service psaux; - FT_Memory memory = stream->memory; + FT_Memory memory = stream->memory; AFM_ParserRec parser; - AFM_FontInfo fi; - FT_Error error = T1_Err_Unknown_File_Format; + AFM_FontInfo fi = NULL; + FT_Error error = T1_Err_Unknown_File_Format; T1_Font t1_font = &( (T1_Face)t1_face )->type1; diff --git a/freetype/src/type1/t1objs.c b/freetype/src/type1/t1objs.c index d9d897ffb..328e326fe 100644 --- a/freetype/src/type1/t1objs.c +++ b/freetype/src/type1/t1objs.c @@ -494,14 +494,17 @@ charmap.face = root; /* first of all, try to synthesize a Unicode charmap */ - charmap.platform_id = 3; - charmap.encoding_id = 1; + charmap.platform_id = TT_PLATFORM_MICROSOFT; + charmap.encoding_id = TT_MS_ID_UNICODE_CS; charmap.encoding = FT_ENCODING_UNICODE; - FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL ); + error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL ); + if ( error && FT_Err_No_Unicode_Glyph_Name != error ) + goto Exit; + error = FT_Err_Ok; /* now, generate an Adobe Standard encoding when appropriate */ - charmap.platform_id = 7; + charmap.platform_id = TT_PLATFORM_ADOBE; clazz = NULL; switch ( type1->encoding_type ) @@ -535,7 +538,7 @@ } if ( clazz ) - FT_CMap_New( clazz, NULL, &charmap, NULL ); + error = FT_CMap_New( clazz, NULL, &charmap, NULL ); #if 0 /* Select default charmap */ |