aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/type42/t42objs.c
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/src/type42/t42objs.c')
-rw-r--r--freetype/src/type42/t42objs.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/freetype/src/type42/t42objs.c b/freetype/src/type42/t42objs.c
index 865381a15..7f30f4d38 100644
--- a/freetype/src/type42/t42objs.c
+++ b/freetype/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, */
@@ -63,7 +63,7 @@
{
FT_ERROR(( "T42_Open_Face: cannot handle FontType %d\n",
type1->font_type ));
- error = T42_Err_Unknown_File_Format;
+ error = FT_THROW( Unknown_File_Format );
goto Exit;
}
@@ -74,7 +74,7 @@
if ( !loader.charstrings.init )
{
FT_ERROR(( "T42_Open_Face: no charstrings array in face\n" ));
- error = T42_Err_Invalid_File_Format;
+ error = FT_THROW( Invalid_File_Format );
}
loader.charstrings.init = 0;
@@ -93,7 +93,6 @@
if ( type1->encoding_type == T1_ENCODING_TYPE_ARRAY )
{
FT_Int charcode, idx, min_char, max_char;
- FT_Byte* char_name;
FT_Byte* glyph_name;
@@ -109,6 +108,9 @@
charcode = 0;
for ( ; charcode < loader.encoding_table.max_elems; charcode++ )
{
+ FT_Byte* char_name;
+
+
type1->encoding.char_index[charcode] = 0;
type1->encoding.char_name [charcode] = (char *)".notdef";
@@ -185,7 +187,7 @@
if ( !psaux )
{
FT_ERROR(( "T42_Face_Init: cannot access `psaux' module\n" ));
- error = T42_Err_Missing_Module;
+ error = FT_THROW( Missing_Module );
goto Exit;
}
@@ -204,7 +206,7 @@
if ( face_index > 0 )
{
FT_ERROR(( "T42_Face_Init: invalid face index\n" ));
- error = T42_Err_Invalid_Argument;
+ error = FT_THROW( Invalid_Argument );
goto Exit;
}
@@ -347,7 +349,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_ERR_NEQ( error, No_Unicode_Glyph_Name ) )
goto Exit;
error = FT_Err_Ok;
@@ -481,12 +484,12 @@
if ( !ttmodule )
{
FT_ERROR(( "T42_Driver_Init: cannot access `truetype' module\n" ));
- return T42_Err_Missing_Module;
+ return FT_THROW( Missing_Module );
}
driver->ttclazz = (FT_Driver_Class)ttmodule->clazz;
- return T42_Err_Ok;
+ return FT_Err_Ok;
}
@@ -504,7 +507,7 @@
FT_Face face = size->face;
T42_Face t42face = (T42_Face)face;
FT_Size ttsize;
- FT_Error error = T42_Err_Ok;
+ FT_Error error = FT_Err_Ok;
error = FT_New_Size( t42face->ttf_face, &ttsize );
@@ -580,7 +583,7 @@
FT_Face face = t42slot->face;
T42_Face t42face = (T42_Face)face;
FT_GlyphSlot ttslot;
- FT_Error error = T42_Err_Ok;
+ FT_Error error = FT_Err_Ok;
if ( face->glyph == NULL )