* src/type1/t1load.c (parse_charstrings): Catch this non-standard beginning of the /CharStrings dictionary: /CharStrings 118 dict def Private begin CharStrings begin
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
diff --git a/ChangeLog b/ChangeLog
index c5d8018..bd824c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-04-14 Werner Lemberg <wl@gnu.org>
+
+ * 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 <wl@gnu.org>
* docs/TODO: Updated.
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index a9015c5..2080a76 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' &&