diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-07-07 09:56:43 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-07-07 09:56:43 +0000 |
commit | 750d5e56c495ac771c2180183e9fccc00f0fe6bf (patch) | |
tree | e2b12ae3c07d546028e969437ab8ca0eb6047540 /Build/source/libs/freetype2/freetype-src/src/type42/t42parse.c | |
parent | 04ab6a8796404e13e659f596d4ae1d912a82ea0f (diff) |
freetype 2.6.4
git-svn-id: svn://tug.org/texlive/trunk@41649 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/src/type42/t42parse.c')
-rw-r--r-- | Build/source/libs/freetype2/freetype-src/src/type42/t42parse.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/src/type42/t42parse.c b/Build/source/libs/freetype2/freetype-src/src/type42/t42parse.c index cf9009bb7af..f948916afaa 100644 --- a/Build/source/libs/freetype2/freetype-src/src/type42/t42parse.c +++ b/Build/source/libs/freetype2/freetype-src/src/type42/t42parse.c @@ -899,8 +899,13 @@ for (;;) { - /* The format is simple: */ - /* `/glyphname' + index [+ def] */ + /* We support two formats. */ + /* */ + /* `/glyphname' + index [+ `def'] */ + /* `(glyphname)' [+ `cvn'] + index [+ `def'] */ + /* */ + /* The latter format gets created by the */ + /* LilyPond typesetting program. */ T1_Skip_Spaces( parser ); @@ -928,12 +933,13 @@ if ( parser->root.error ) return; - if ( *cur == '/' ) + if ( *cur == '/' || *cur == '(' ) { FT_UInt len; + FT_Bool have_literal = ( *cur == '(' ); - if ( cur + 2 >= limit ) + if ( cur + ( have_literal ? 3 : 2 ) >= limit ) { FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); error = FT_THROW( Invalid_File_Format ); @@ -942,6 +948,8 @@ cur++; /* skip `/' */ len = (FT_UInt)( parser->root.cursor - cur ); + if ( have_literal ) + len--; error = T1_Add_Table( name_table, n, cur, len + 1 ); if ( error ) @@ -961,6 +969,9 @@ T1_Skip_Spaces( parser ); + if ( have_literal ) + T1_Skip_PS_Token( parser ); + cur = parser->root.cursor; (void)T1_ToInt( parser ); |