diff options
author | Werner Lemberg <wl@gnu.org> | 2003-10-07 20:06:35 +0000 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2003-10-07 20:06:35 +0000 |
commit | ed3a7d7b0f77030530dbbaecf7b786853a693774 (patch) | |
tree | 00381e2bb5a5fa278d33473e59a31d4361f9910b | |
parent | 34808199ce9f2079c2b7bb5c73e607a29e31b16b (diff) | |
download | freetype2-ed3a7d7b0f77030530dbbaecf7b786853a693774.tar.gz |
* src/type1/t1load.c (parse_dict): Handle synthetic
fonts properly.
(parse_charstrings): Copy correct number of characters into
`name_table'.
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/psaux/t1decode.c | 2 | ||||
-rw-r--r-- | src/type1/t1load.c | 24 |
3 files changed, 17 insertions, 11 deletions
@@ -2,6 +2,8 @@ * src/type1/t1load.c (parse_subrs, parse_dict): Handle synthetic fonts properly. + (parse_charstrings): Copy correct number of characters into + `name_table'. 2003-10-06 Werner Lemberg <wl@gnu.org> diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c index 76b688ff8..6cc0948cd 100644 --- a/src/psaux/t1decode.c +++ b/src/psaux/t1decode.c @@ -143,7 +143,7 @@ if ( name && name[0] == glyph_name[0] && - ft_strcmp( name,glyph_name ) == 0 ) + ft_strcmp( name, glyph_name ) == 0 ) return n; } diff --git a/src/type1/t1load.c b/src/type1/t1load.c index 3f1322dad..a59e2a8eb 100644 --- a/src/type1/t1load.c +++ b/src/type1/t1load.c @@ -1055,10 +1055,14 @@ T1_Skip_PS_Token( parser ); /* `array' */ T1_Skip_Spaces ( parser ); - /* initialize subrs array */ - error = psaux->ps_table_funcs->init( table, num_subrs, memory ); - if ( error ) - goto Fail; + /* initialize subrs array -- with synthetic fonts it is possible */ + /* we get here twice */ + if ( !loader->num_subrs ) + { + error = psaux->ps_table_funcs->init( table, num_subrs, memory ); + if ( error ) + goto Fail; + } /* the format is simple: */ /* */ @@ -1220,23 +1224,23 @@ break; } - if ( *cur != '/' ) - T1_Skip_PS_Token( parser ); - else + T1_Skip_PS_Token( parser ); + + if ( *cur == '/' ) { FT_PtrDist len; - T1_Skip_PS_Token( parser ); - if ( cur >= limit ) + if ( cur + 1 >= limit ) { error = T1_Err_Invalid_File_Format; goto Fail; } + cur++; /* skip `/' */ len = parser->root.cursor - cur; - error = T1_Add_Table( name_table, n, cur + 1, len + 1 ); + error = T1_Add_Table( name_table, n, cur, len + 1 ); if ( error ) goto Fail; |