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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
diff --git a/ChangeLog b/ChangeLog
index aa98b6a..5d3af72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2013-03-11 Werner Lemberg <wl@gnu.org>
+
+ 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 <wl@gnu.org>
[cff] Set `linear{Hori,Vert}Advance' for embedded bitmaps also.
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index e3958ba..1443aa7 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 b4dddb7..7725477 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 388f1fc..202873a 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 b685f2f..1a7eb4b 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 c6053af..5b53502 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;