Index: t1load.c =================================================================== RCS file: /cvsroot/freetype2/src/type1/t1load.c,v retrieving revision 1.31 diff -u -r1.31 t1load.c --- t1load.c 2000/12/13 19:55:10 1.31 +++ t1load.c 2001/01/22 02:45:04 @@ -879,6 +879,7 @@ FT_Matrix* matrix = &face->type1.font_matrix; FT_Vector* offset = &face->type1.font_offset; FT_Fixed temp[6]; + FT_Fixed temp_scale; if ( matrix->xx || matrix->yx ) @@ -887,14 +888,16 @@ (void)T1_ToFixedArray( parser, 6, temp, 3 ); - /* we need to scale the values by 1.0/temp[3] */ - if ( temp[3] != 0x10000L ) + temp_scale = ABS( temp[3] ); + + /* we need to scale the values by 1.0/temp_scale */ + if ( temp_scale != 0x10000L ) { - temp[0] = FT_DivFix( temp[0], temp[3] ); - temp[1] = FT_DivFix( temp[1], temp[3] ); - temp[2] = FT_DivFix( temp[2], temp[3] ); - temp[4] = FT_DivFix( temp[4], temp[3] ); - temp[5] = FT_DivFix( temp[5], temp[3] ); + temp[0] = FT_DivFix( temp[0], temp_scale ); + temp[1] = FT_DivFix( temp[1], temp_scale ); + temp[2] = FT_DivFix( temp[2], temp_scale ); + temp[4] = FT_DivFix( temp[4], temp_scale ); + temp[5] = FT_DivFix( temp[5], temp_scale ); temp[3] = 0x10000L; } @@ -1461,12 +1464,6 @@ len = cur2 - cur; if ( len > 0 && len < 22 ) { - if ( !loader->fontdata ) - { - if ( strncmp( (char*)cur, "FontInfo", 8 ) == 0 ) - loader->fontdata = 1; - } - else { /* now, compare the immediate name to the keyword table */ T1_Field* keyword = (T1_Field*)t1_keywords; @@ -1594,10 +1591,13 @@ /* to the Type1 data */ type1->num_glyphs = loader.num_glyphs; - if ( !loader.subrs.init ) + if ( loader.subrs.init ) { - FT_ERROR(( "T1_Open_Face: no subrs array in face!\n" )); - error = T1_Err_Invalid_File_Format; + loader.subrs.init = 0; + type1->num_subrs = loader.num_subrs; + type1->subrs_block = loader.subrs.block; + type1->subrs = loader.subrs.elements; + type1->subrs_len = loader.subrs.lengths; } if ( !loader.charstrings.init ) @@ -1605,12 +1605,6 @@ FT_ERROR(( "T1_Open_Face: no charstrings array in face!\n" )); error = T1_Err_Invalid_File_Format; } - - loader.subrs.init = 0; - type1->num_subrs = loader.num_subrs; - type1->subrs_block = loader.subrs.block; - type1->subrs = loader.subrs.elements; - type1->subrs_len = loader.subrs.lengths; loader.charstrings.init = 0; type1->charstrings_block = loader.charstrings.block;