summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfmx/src/t1_load.c
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-05-19 00:42:35 +0000
committerKarl Berry <karl@freefriends.org>2009-05-19 00:42:35 +0000
commit136f54b7dc95964f3db31da84ba3f1961967babe (patch)
tree2050345bf4d6396bce5b756842aea46626c7d53b /Build/source/texk/dvipdfmx/src/t1_load.c
parent53241b23b422addce6dd1145dfa1d334a940c45d (diff)
update to http://project.ktug.or.kr/dvipdfmx/snapshot/latest/dvipdfmx-20090506.tar.gz
git-svn-id: svn://tug.org/texlive/trunk@13221 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfmx/src/t1_load.c')
-rw-r--r--Build/source/texk/dvipdfmx/src/t1_load.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/Build/source/texk/dvipdfmx/src/t1_load.c b/Build/source/texk/dvipdfmx/src/t1_load.c
index 9efbb20c149..d58428cf616 100644
--- a/Build/source/texk/dvipdfmx/src/t1_load.c
+++ b/Build/source/texk/dvipdfmx/src/t1_load.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/t1_load.c,v 1.12 2008/10/13 19:42:48 matthias Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/t1_load.c,v 1.13 2009/04/08 03:10:58 chofchof Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -566,18 +566,24 @@ parse_subrs (cff_font *font,
}
if (mode != 1) {
- subrs = font->subrs[0] = cff_new_index(count);
- subrs->data = NEW(offset, card8);
- offset = 0;
- for (i = 0; i < count; i++) {
- subrs->offset[i] = offset + 1;
- if (lengths[i] > 0) {
- memcpy(subrs->data + offset, data + offsets[i], lengths[i]);
- offset += lengths[i];
+ if (font->subrs[0] == NULL) {
+ subrs = font->subrs[0] = cff_new_index(count);
+ subrs->data = NEW(offset, card8);
+ offset = 0;
+ for (i = 0; i < count; i++) {
+ subrs->offset[i] = offset + 1;
+ if (lengths[i] > 0) {
+ memcpy(subrs->data + offset, data + offsets[i], lengths[i]);
+ offset += lengths[i];
+ }
}
+ subrs->offset[count] = offset + 1;
+ } else {
+ /* Adobe's OPO_____.PFB and OPBO____.PFB have two /Subrs dicts,
+ * and also have /CharStrings not followed by dicts.
+ * Simply ignores those data. By ChoF on 2009/04/08. */
+ WARN("Already found /Subrs; ignores the other /Subrs dicts.");
}
- subrs->offset[count] = offset + 1;
-
RELEASE(data);
RELEASE(offsets);
RELEASE(lengths);
@@ -605,8 +611,11 @@ parse_charstrings (cff_font *font,
tok = pst_get_token(start, end);
if (!PST_INTEGERTYPE(tok) ||
pst_getIV(tok) < 0 || pst_getIV(tok) > CFF_GLYPH_MAX) {
+ unsigned char *s = pst_getSV(tok);
+ WARN("Ignores non dict \"/CharStrings %s ...\"", s);
+ RELEASE(s);
RELEASE_TOK(tok);
- return -1;
+ return 0;
}
count = pst_getIV(tok);
RELEASE_TOK(tok);