Ticket #33711: patch-src_type1_t1load.c.diff
File patch-src_type1_t1load.c.diff, 2.6 KB (added by florian@…, 13 years ago) |
---|
-
src/type1/t1load.c
old new 71 71 #include "t1errors.h" 72 72 73 73 74 #ifdef FT_CONFIG_OPTION_INCREMENTAL 75 #define IS_INCREMENTAL ( face->root.internal->incremental_interface != 0 ) 76 #else 77 #define IS_INCREMENTAL 0 78 #endif 79 80 74 81 /*************************************************************************/ 75 82 /* */ 76 83 /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ … … 1030 1037 static int 1031 1038 read_binary_data( T1_Parser parser, 1032 1039 FT_Long* size, 1033 FT_Byte** base ) 1040 FT_Byte** base, 1041 FT_Bool incremental ) 1034 1042 { 1035 1043 FT_Byte* cur; 1036 1044 FT_Byte* limit = parser->root.limit; … … 1065 1073 } 1066 1074 } 1067 1075 1068 FT_ERROR(( "read_binary_data: invalid size field\n" )); 1069 parser->root.error = T1_Err_Invalid_File_Format; 1076 if( !incremental ) 1077 { 1078 FT_ERROR(( "read_binary_data: invalid size field\n" )); 1079 parser->root.error = T1_Err_Invalid_File_Format; 1080 } 1081 1070 1082 return 0; 1071 1083 } 1072 1084 … … 1396 1408 1397 1409 idx = T1_ToInt( parser ); 1398 1410 1399 if ( !read_binary_data( parser, &size, &base ) )1411 if ( !read_binary_data( parser, &size, &base, IS_INCREMENTAL ) ) 1400 1412 return; 1401 1413 1402 1414 /* The binary string is followed by one token, e.g. `NP' */ … … 1582 1594 cur++; /* skip `/' */ 1583 1595 len = parser->root.cursor - cur; 1584 1596 1585 if ( !read_binary_data( parser, &size, &base ) )1597 if ( !read_binary_data( parser, &size, &base, IS_INCREMENTAL ) ) 1586 1598 return; 1587 1599 1588 1600 /* for some non-standard fonts like `Optima' which provides */ … … 1871 1883 1872 1884 1873 1885 parser->root.cursor = start_binary; 1874 if ( !read_binary_data( parser, &s, &b ) )1886 if ( !read_binary_data( parser, &s, &b, IS_INCREMENTAL ) ) 1875 1887 return T1_Err_Invalid_File_Format; 1876 1888 have_integer = 0; 1877 1889 } … … 1884 1896 1885 1897 1886 1898 parser->root.cursor = start_binary; 1887 if ( !read_binary_data( parser, &s, &b ) )1899 if ( !read_binary_data( parser, &s, &b, IS_INCREMENTAL ) ) 1888 1900 return T1_Err_Invalid_File_Format; 1889 1901 have_integer = 0; 1890 1902 } … … 2160 2172 type1->subrs_len = loader.subrs.lengths; 2161 2173 } 2162 2174 2163 #ifdef FT_CONFIG_OPTION_INCREMENTAL 2164 if ( !face->root.internal->incremental_interface ) 2165 #endif 2175 if ( !IS_INCREMENTAL ) 2166 2176 if ( !loader.charstrings.init ) 2167 2177 { 2168 2178 FT_ERROR(( "T1_Open_Face: no `/CharStrings' array in face\n" ));