diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-01-03 14:00:51 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-01-03 14:00:51 +0000 |
commit | c28786e0eee40914b9133aa8201b710de68c65e3 (patch) | |
tree | 4373cd13398b2fce1359ccfeae0eea5a52525b49 /Build | |
parent | 99eca4d649a45342ac0edaac98e6e20a836250b0 (diff) |
texk/dvipdfm-x: Improve the change on 2015-08-05 to support native type1 fonts.
git-svn-id: svn://tug.org/texlive/trunk@39263 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/dvipdfm-x/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/cff.h | 1 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/dvi.c | 41 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/t1_load.c | 4 |
4 files changed, 11 insertions, 40 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index 7d0d793ed65..192f7ad5bcd 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -1,5 +1,10 @@ 2016-01-03 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + * cff.h, dvi.c, t1_load.c: Improve the change made on 2015-08-05. + The static function static int is_notdef_notzero() in dvi.c is removed. + +2016-01-03 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + * dpxfile.c: Change \ to / for WIN32 also in the case where HAVE_MKSTEMP is defined (win32 only). diff --git a/Build/source/texk/dvipdfm-x/cff.h b/Build/source/texk/dvipdfm-x/cff.h index 97eea6229f6..6e845b378f6 100644 --- a/Build/source/texk/dvipdfm-x/cff.h +++ b/Build/source/texk/dvipdfm-x/cff.h @@ -77,6 +77,7 @@ typedef struct int index; /* CFF fontset index */ int flag; /* Flag: see above */ + int is_notdef_notzero; /* 1 if .notdef is not the 1st glyph */ } cff_font; extern cff_font *cff_open (FILE *file, int offset, int idx); diff --git a/Build/source/texk/dvipdfm-x/dvi.c b/Build/source/texk/dvipdfm-x/dvi.c index d5db33825bf..6976fe335f6 100644 --- a/Build/source/texk/dvipdfm-x/dvi.c +++ b/Build/source/texk/dvipdfm-x/dvi.c @@ -944,45 +944,6 @@ dvi_locate_font (const char *tfm_name, spt_t ptsize) } static int -is_notdef_notzero (char *path) -{ - FILE *f; - char buf[2048]; - char *cmd; - char *p; - int ret = 0; - - p = kpse_var_value("SELFAUTOLOC"); - if (p == NULL) - return ret; -#if defined(_WIN32) - cmd = concatn ("\"", p, "/t1disasm.exe\" \"", path, "\"", NULL); -#else - cmd = concat3 (p, "/t1disasm ", path); -#endif - free (p); - f = popen (cmd, "r"); - free (cmd); - if (f) { - while ((fgets (buf, 2047, f))) { - p = strstr (buf, "CharStrings"); - if (p) { - fgets (buf, 2047, f); - p = buf; - while (*p == ' ' || *p == '\t') - p++; - if (strncmp (p, "/.notdef", 8) != 0) - ret = 1; - break; - } - } - fclose(f); - } - - return ret; -} - -static int dvi_locate_native_font (const char *filename, uint32_t index, spt_t ptsize, int layout_dir, int extend, int slant, int embolden) { @@ -1064,7 +1025,7 @@ dvi_locate_native_font (const char *filename, uint32_t index, DPXFCLOSE(fp); if (loaded_fonts[cur_id].cff_is_standard_encoding) { - loaded_fonts[cur_id].cff_is_standard_encoding = is_notdef_notzero (path); + loaded_fonts[cur_id].cff_is_standard_encoding = cffont->is_notdef_notzero; } } else { if (is_dfont) diff --git a/Build/source/texk/dvipdfm-x/t1_load.c b/Build/source/texk/dvipdfm-x/t1_load.c index da6ed660888..6dbaf51a787 100644 --- a/Build/source/texk/dvipdfm-x/t1_load.c +++ b/Build/source/texk/dvipdfm-x/t1_load.c @@ -744,6 +744,7 @@ parse_charstrings (cff_font *font, offset = 0; have_notdef = 0; /* .notdef must be at gid = 0 in CFF */ + font->is_notdef_notzero = 0; seek_operator(start, end, "begin"); for (i = 0; i < count; i++) { char *glyph_name; @@ -756,6 +757,9 @@ parse_charstrings (cff_font *font, tok = pst_get_token(start, end); glyph_name = (char *)pst_getSV(tok); + if ((i == 0) && (strcmp (glyph_name, ".notdef") != 0)) + font->is_notdef_notzero = 1; + if (PST_NAMETYPE(tok)) { RELEASE_TOK(tok); if (!glyph_name) { |