summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/pdftexdir/writet1.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-11-11 08:26:36 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-11-11 08:26:36 +0000
commitf5af95653b92f30048ffc76bf63b27388f8140b6 (patch)
treefacfa11570d02e7b8145cf263f0ae76c92449b4a /Build/source/texk/web2c/pdftexdir/writet1.c
parent651f340b6ee97f87e9b81fc4976776c407632ff4 (diff)
handle number on different line than /CharStrings; report from DEK, fix from Thanh
git-svn-id: svn://tug.org/texlive/trunk@20405 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/pdftexdir/writet1.c')
-rw-r--r--Build/source/texk/web2c/pdftexdir/writet1.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/writet1.c b/Build/source/texk/web2c/pdftexdir/writet1.c
index 65aacc05460..0f62e217f2c 100644
--- a/Build/source/texk/web2c/pdftexdir/writet1.c
+++ b/Build/source/texk/web2c/pdftexdir/writet1.c
@@ -1609,9 +1609,32 @@ static void t1_mark_glyphs(void)
subr_max = ptr - subr_tab;
}
+static void t1_check_unusual_charstring(void)
+{
+ char *p = strstr(t1_line_array, charstringname) + strlen(charstringname);
+ int i;
+ /* if no number follows "/CharStrings", let's read the next line */
+ if (sscanf(p, "%i", &i) != 1) {
+ strcpy(t1_buf_array, t1_line_array);
+ t1_getline();
+ strcat(t1_buf_array, t1_line_array);
+ strcpy(t1_line_array, t1_buf_array);
+ t1_line_ptr = eol(t1_line_array);
+ }
+}
+
static void t1_subset_charstrings(void)
{
cs_entry *ptr;
+
+ /* at this point t1_line_array contains "/CharStrings".
+ when we hit a case like this:
+ dup/CharStrings
+ 229 dict dup begin
+ we read the next line and concatenate to t1_line_array before moving on
+ */
+ t1_check_unusual_charstring();
+
cs_size_pos = strstr(t1_line_array, charstringname) + strlen(charstringname)
- t1_line_array + 1;
/* cs_size_pos points to the number indicating