diff --git a/ChangeLog b/ChangeLog index aa98b6a63..5d3af72d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2013-03-11 Werner Lemberg + + Always use module related error codes. + + * src/cff/cffobjs.c (cff_face_init), src/type1/t1objs.c + (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Use + `FT_ERROR_BASE'. + + * src/type1/t1load.c (parse_encoding): Use + T1_Err_Unknown_File_Format. + 2013-03-08 Werner Lemberg [cff] Set `linear{Hori,Vert}Advance' for embedded bitmaps also. diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c index e3958bafc..1443aa74f 100644 --- a/src/cff/cffgload.c +++ b/src/cff/cffgload.c @@ -4,7 +4,7 @@ /* */ /* OpenType Glyph Loader (body). */ /* */ -/* Copyright 1996-2012 by */ +/* Copyright 1996-2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c index b4dddb747..772547790 100644 --- a/src/cff/cffobjs.c +++ b/src/cff/cffobjs.c @@ -4,7 +4,7 @@ /* */ /* OpenType objects manager (body). */ /* */ -/* Copyright 1996-2012 by */ +/* Copyright 1996-2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -959,7 +959,8 @@ error = FT_CMap_New( &CFF_CMAP_UNICODE_CLASS_REC_GET, NULL, &cmaprec, NULL ); - if ( error && FT_Err_No_Unicode_Glyph_Name != error ) + if ( error && + FT_ERROR_BASE( error ) != FT_Err_No_Unicode_Glyph_Name ) goto Exit; error = FT_Err_Ok; diff --git a/src/type1/t1load.c b/src/type1/t1load.c index 388f1fc68..202873a0a 100644 --- a/src/type1/t1load.c +++ b/src/type1/t1load.c @@ -4,7 +4,7 @@ /* */ /* Type 1 font loader (body). */ /* */ -/* Copyright 1996-2012 by */ +/* Copyright 1996-2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -1312,7 +1312,7 @@ /* specification (it might be an encoding for a CID type1 */ /* font, however), so we conclude that this font is NOT a */ /* type1 font. */ - parser->root.error = FT_Err_Unknown_File_Format; + parser->root.error = T1_Err_Unknown_File_Format; return; } } diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c index b685f2f1b..1a7eb4b91 100644 --- a/src/type1/t1objs.c +++ b/src/type1/t1objs.c @@ -4,7 +4,7 @@ /* */ /* Type 1 objects manager (body). */ /* */ -/* Copyright 1996-2009, 2011 by */ +/* Copyright 1996-2009, 2011, 2013 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -517,7 +517,8 @@ charmap.encoding = FT_ENCODING_UNICODE; error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL ); - if ( error && FT_Err_No_Unicode_Glyph_Name != error ) + if ( error && + FT_ERROR_BASE( error ) != FT_Err_No_Unicode_Glyph_Name ) goto Exit; error = FT_Err_Ok; diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c index c6053afed..5b53502c3 100644 --- a/src/type42/t42objs.c +++ b/src/type42/t42objs.c @@ -4,7 +4,7 @@ /* */ /* Type 42 objects manager (body). */ /* */ -/* Copyright 2002-2009, 2011 */ +/* Copyright 2002-2009, 2011, 2013 */ /* by Roberto Alameda. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -347,7 +347,8 @@ charmap.encoding = FT_ENCODING_UNICODE; error = FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL ); - if ( error && FT_Err_No_Unicode_Glyph_Name != error ) + if ( error && + FT_ERROR_BASE( error) != FT_Err_No_Unicode_Glyph_Name ) goto Exit; error = FT_Err_Ok;