From e7602c4b4ae3d2f4c1800f0c21a7cd499ff3899a Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 14 Apr 2005 11:43:40 +0000 Subject: [PATCH] * src/type1/t1load.c (parse_charstrings): Catch this non-standard beginning of the /CharStrings dictionary: /CharStrings 118 dict def Private begin CharStrings begin --- ChangeLog | 9 +++++++++ src/type1/t1load.c | 15 ++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c5d80181..bd824c32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-04-14 Werner Lemberg + + * src/type1/t1load.c (parse_charstrings): Catch this non-standard + beginning of the /CharStrings dictionary: + + /CharStrings 118 dict def + Private begin + CharStrings begin + 2005-04-13 Werner Lemberg * docs/TODO: Updated. diff --git a/src/type1/t1load.c b/src/type1/t1load.c index a9015c5b..2080a766 100644 --- a/src/type1/t1load.c +++ b/src/type1/t1load.c @@ -1448,7 +1448,20 @@ if ( cur[0] == 'd' && cur[1] == 'e' && cur[2] == 'f' ) - break; + { + /* There are fonts which have this: */ + /* */ + /* /CharStrings 118 dict def */ + /* Private begin */ + /* CharStrings begin */ + /* ... */ + /* */ + /* To catch this we ignore `def' if */ + /* no charstring has actually been */ + /* seen. */ + if ( n ) + break; + } if ( cur[0] == 'e' && cur[1] == 'n' &&