[type42] Support `CharStrings' entry format as created by LilyPond.
* src/type42/t42parse.c (t42_parse_charstrings): Handle entries having the format (foo) cvn 12345 def
This commit is contained in:
parent
46d36904b0
commit
d28eac249a
|
@ -1,3 +1,12 @@
|
||||||
|
2016-05-30 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
[type42] Support `CharStrings' entry format as created by LilyPond.
|
||||||
|
|
||||||
|
* src/type42/t42parse.c (t42_parse_charstrings): Handle entries
|
||||||
|
having the format
|
||||||
|
|
||||||
|
(foo) cvn 12345 def
|
||||||
|
|
||||||
2016-05-28 Werner Lemberg <wl@gnu.org>
|
2016-05-28 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
* src/autofit/afranges.c: Remove `UL' postfix from hex numbers.
|
* src/autofit/afranges.c: Remove `UL' postfix from hex numbers.
|
||||||
|
|
|
@ -899,8 +899,13 @@
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
/* The format is simple: */
|
/* We support two formats. */
|
||||||
/* `/glyphname' + index [+ def] */
|
/* */
|
||||||
|
/* `/glyphname' + index [+ `def'] */
|
||||||
|
/* `(glyphname)' [+ `cvn'] + index [+ `def'] */
|
||||||
|
/* */
|
||||||
|
/* The latter format gets created by the */
|
||||||
|
/* LilyPond typesetting program. */
|
||||||
|
|
||||||
T1_Skip_Spaces( parser );
|
T1_Skip_Spaces( parser );
|
||||||
|
|
||||||
|
@ -928,12 +933,13 @@
|
||||||
if ( parser->root.error )
|
if ( parser->root.error )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( *cur == '/' )
|
if ( *cur == '/' || *cur == '(' )
|
||||||
{
|
{
|
||||||
FT_UInt len;
|
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" ));
|
FT_ERROR(( "t42_parse_charstrings: out of bounds\n" ));
|
||||||
error = FT_THROW( Invalid_File_Format );
|
error = FT_THROW( Invalid_File_Format );
|
||||||
|
@ -942,6 +948,8 @@
|
||||||
|
|
||||||
cur++; /* skip `/' */
|
cur++; /* skip `/' */
|
||||||
len = (FT_UInt)( parser->root.cursor - cur );
|
len = (FT_UInt)( parser->root.cursor - cur );
|
||||||
|
if ( have_literal )
|
||||||
|
len--;
|
||||||
|
|
||||||
error = T1_Add_Table( name_table, n, cur, len + 1 );
|
error = T1_Add_Table( name_table, n, cur, len + 1 );
|
||||||
if ( error )
|
if ( error )
|
||||||
|
@ -961,6 +969,9 @@
|
||||||
|
|
||||||
T1_Skip_Spaces( parser );
|
T1_Skip_Spaces( parser );
|
||||||
|
|
||||||
|
if ( have_literal )
|
||||||
|
T1_Skip_PS_Token( parser );
|
||||||
|
|
||||||
cur = parser->root.cursor;
|
cur = parser->root.cursor;
|
||||||
|
|
||||||
(void)T1_ToInt( parser );
|
(void)T1_ToInt( parser );
|
||||||
|
|
Loading…
Reference in New Issue