summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2012-08-21 10:06:35 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2012-08-21 10:06:35 +0000
commit82f5e68f126a54f0dfe45b4e9dd42e9af6922768 (patch)
tree0623bd5e62005c0ac35431aa2d7c3b0519744357
parentf215977bffc2535de7072aa5b7493016e6bfca04 (diff)
fix of the type1 SEAC bug from K. Shikano
git-svn-id: svn://tug.org/texlive/trunk@27480 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/xdvipdfmx/ChangeLog.TL4
-rw-r--r--Build/source/texk/xdvipdfmx/src/cff.c15
-rw-r--r--Build/source/texk/xdvipdfmx/src/cff.h1
-rw-r--r--Build/source/texk/xdvipdfmx/src/type1.c4
4 files changed, 22 insertions, 2 deletions
diff --git a/Build/source/texk/xdvipdfmx/ChangeLog.TL b/Build/source/texk/xdvipdfmx/ChangeLog.TL
index a7469661bd5..c5c5061b22b 100644
--- a/Build/source/texk/xdvipdfmx/ChangeLog.TL
+++ b/Build/source/texk/xdvipdfmx/ChangeLog.TL
@@ -1,6 +1,10 @@
ChangeLog.TL: TeX Live (TL) changes for xdvipdfmx
=================================================
+2012-08-21 keiichirou shikano <k16.shikano@gmail.com>
+
+ * src/cff.c, src/cff.h. src/type1.c: fix type1 SEAC bug.
+
2012-08-18 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* dvi.c: Fix a bug in dvi_init(). The old one fails for dvi or xdv
diff --git a/Build/source/texk/xdvipdfmx/src/cff.c b/Build/source/texk/xdvipdfmx/src/cff.c
index dcc5bb71726..e6f8d31733b 100644
--- a/Build/source/texk/xdvipdfmx/src/cff.c
+++ b/Build/source/texk/xdvipdfmx/src/cff.c
@@ -530,6 +530,21 @@ long cff_get_sid (cff_font *cff, const char *str)
return -1;
}
+long cff_get_seac_sid (cff_font *cff, const char *str)
+{
+ card16 i;
+
+ if (!cff || !str)
+ return -1;
+
+ for (i = 0; i < CFF_STDSTR_MAX; i++) {
+ if (!strcmp(str, cff_stdstr[i]))
+ return i;
+ }
+
+ return -1;
+}
+
int cff_match_string (cff_font *cff, const char *str, s_SID sid)
{
card16 i;
diff --git a/Build/source/texk/xdvipdfmx/src/cff.h b/Build/source/texk/xdvipdfmx/src/cff.h
index 08091cbc0f6..f9392dc4522 100644
--- a/Build/source/texk/xdvipdfmx/src/cff.h
+++ b/Build/source/texk/xdvipdfmx/src/cff.h
@@ -147,6 +147,7 @@ extern unsigned short* cff_get_ft_to_gid(cff_font *cff);
extern int cff_match_string (cff_font *cff, const char *str, s_SID sid);
extern char *cff_get_string (cff_font *cff, s_SID id);
extern long cff_get_sid (cff_font *cff, const char *str);
+extern long cff_get_seac_sid (cff_font *cff, const char *str);
extern s_SID cff_add_string (cff_font *cff, const char *str, int unique);
extern void cff_update_string (cff_font *cff);
diff --git a/Build/source/texk/xdvipdfmx/src/type1.c b/Build/source/texk/xdvipdfmx/src/type1.c
index 788db75255d..3fb34dd2172 100644
--- a/Build/source/texk/xdvipdfmx/src/type1.c
+++ b/Build/source/texk/xdvipdfmx/src/type1.c
@@ -737,7 +737,7 @@ pdf_font_load_type1 (pdf_font *font)
if (verbose > 2)
MESG("/%s", achar_name);
GIDMap[num_glyphs++] = achar_gid;
- charset->data.glyphs[charset->num_entries] = cff_get_sid(cffont, achar_name);
+ charset->data.glyphs[charset->num_entries] = cff_get_seac_sid(cffont, achar_name);
charset->num_entries += 1;
}
@@ -749,7 +749,7 @@ pdf_font_load_type1 (pdf_font *font)
if (verbose > 2)
MESG("/%s", bchar_name);
GIDMap[num_glyphs++] = bchar_gid;
- charset->data.glyphs[charset->num_entries] = cff_get_sid(cffont, bchar_name);
+ charset->data.glyphs[charset->num_entries] = cff_get_seac_sid(cffont, bchar_name);
charset->num_entries += 1;
}
have_seac = 1;