summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2020-10-18 20:56:51 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2020-10-18 20:56:51 +0000
commit412557e971ebdfb7d50a96e8fff49025641dcd5f (patch)
tree9e0abdbac8a19bce537abe75c79635ba3afb76df /Build/source/texk
parent2451453f775a750ce7472628d0ed7b41e5f4ec3c (diff)
Extension to load user defined CID-to-GID mapping for TrueType fonts. (S. Hirata)
git-svn-id: svn://tug.org/texlive/trunk@56697 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/dvipdfm-x/ChangeLog12
-rw-r--r--Build/source/texk/dvipdfm-x/cidtype0.c61
-rw-r--r--Build/source/texk/dvipdfm-x/cidtype2.c175
-rwxr-xr-xBuild/source/texk/dvipdfm-x/configure22
-rw-r--r--Build/source/texk/dvipdfm-x/configure.ac2
-rw-r--r--Build/source/texk/dvipdfm-x/data/Adobe-Japan1-YuMincho-Regular135
-rw-r--r--Build/source/texk/dvipdfm-x/data/dvipdfmx.cfg2
-rw-r--r--Build/source/texk/dvipdfm-x/type0.c16
8 files changed, 318 insertions, 107 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog
index 5382f93a745..ea0caa05fff 100644
--- a/Build/source/texk/dvipdfm-x/ChangeLog
+++ b/Build/source/texk/dvipdfm-x/ChangeLog
@@ -1,3 +1,15 @@
+2020-10-19 Shunsaku Hirata <shunsaku.hirata74@gmail.com>
+
+ * cidtype0.c, cidtype2.c, type0.c: User defined CID-to-GID
+ PostScript CMap with filename of the form
+ REGISTRY-ORDERING-PSFontName can be loaded (if exist) for
+ mapping CIDs to GIDs. This feature can be used for directory
+ mapping CIDs to GIDs instead of
+ CID -> to-code CMaps -> TrueType cmap -> GID route.
+ * data/Adobe-Japan1-YuMincho-Regular: An example of CID-to-GID
+ CMap file.
+ * configure.ac: Version 20201019.
+
2020-10-14 Shunsaku Hirata <shunsaku.hirata74@gmail.com>
* tt_cmap.c: Fix a bug that checking array indices is wrong.
diff --git a/Build/source/texk/dvipdfm-x/cidtype0.c b/Build/source/texk/dvipdfm-x/cidtype0.c
index d6c10fa1d19..6e78cefdda9 100644
--- a/Build/source/texk/dvipdfm-x/cidtype0.c
+++ b/Build/source/texk/dvipdfm-x/cidtype0.c
@@ -823,17 +823,18 @@ CIDFont_type0_open_from_t1 (pdf_font *font, const char *name, int index, cid_opt
pdf_new_name("Subtype"),
pdf_new_name("CIDFontType0"));
- memmove(fontname + 7, fontname, strlen(fontname) + 1);
- pdf_font_make_uniqueTag(fontname);
- fontname[6] = '+';
+ pdf_font_make_uniqueTag(font->uniqueID);
font->descriptor = pdf_new_dict();
- pdf_add_dict(font->descriptor,
- pdf_new_name("FontName"),
- pdf_new_name(fontname));
- pdf_add_dict(font->resource,
- pdf_new_name("BaseFont"),
- pdf_new_name(fontname));
+ {
+ char *tmp;
+
+ tmp = NEW(strlen(font->fontname)+8, char);
+ sprintf(tmp, "%s+%s", font->uniqueID, font->fontname);
+ pdf_add_dict(font->descriptor, pdf_new_name("FontName"), pdf_new_name(tmp));
+ pdf_add_dict(font->resource, pdf_new_name("BaseFont"), pdf_new_name(tmp));
+ RELEASE(tmp);
+ }
{
pdf_obj *csi_dict = pdf_new_dict();
pdf_add_dict(csi_dict,
@@ -971,17 +972,18 @@ CIDFont_type0_open (pdf_font *font, const char *name, int index, cid_opt *opt)
pdf_new_name("CIDFontType0"));
if (opt->embed) {
- memmove(fontname + 7, fontname, strlen(fontname) + 1);
- pdf_font_make_uniqueTag(fontname);
- fontname[6] = '+';
+ char *tmp;
+
+ tmp = NEW(strlen(font->fontname)+8, char);
+ pdf_font_make_uniqueTag(font->uniqueID);
+ sprintf(tmp, "%s+%s", font->uniqueID, font->fontname);
+ pdf_add_dict(font->descriptor, pdf_new_name("FontName"), pdf_new_name(tmp));
+ pdf_add_dict(font->resource, pdf_new_name("BaseFont"), pdf_new_name(tmp));
+ RELEASE(tmp);
+ } else {
+ pdf_add_dict(font->descriptor, pdf_new_name("FontName"), pdf_new_name(font->fontname));
+ pdf_add_dict(font->resource, pdf_new_name("BaseFont"), pdf_new_name(font->fontname));
}
-
- pdf_add_dict(font->descriptor,
- pdf_new_name("FontName"),
- pdf_new_name(fontname));
- pdf_add_dict(font->resource,
- pdf_new_name("BaseFont"),
- pdf_new_name(fontname));
{
pdf_obj *csi_dict = pdf_new_dict();
pdf_add_dict(csi_dict,
@@ -1118,17 +1120,18 @@ CIDFont_type0_open_from_t1c (pdf_font *font, const char *name, int index, cid_op
pdf_new_name("CIDFontType0"));
if (opt->embed) {
- memmove(fontname + 7, fontname, strlen(fontname) + 1);
- pdf_font_make_uniqueTag(fontname);
- fontname[6] = '+';
+ char *tmp;
+
+ tmp = NEW(strlen(font->fontname)+8, char);
+ pdf_font_make_uniqueTag(font->uniqueID);
+ sprintf(tmp, "%s+%s", font->uniqueID, font->fontname);
+ pdf_add_dict(font->descriptor, pdf_new_name("FontName"), pdf_new_name(tmp));
+ pdf_add_dict(font->resource, pdf_new_name("BaseFont"), pdf_new_name(tmp));
+ RELEASE(tmp);
+ } else {
+ pdf_add_dict(font->descriptor, pdf_new_name("FontName"), pdf_new_name(font->fontname));
+ pdf_add_dict(font->resource, pdf_new_name("BaseFont"), pdf_new_name(font->fontname));
}
-
- pdf_add_dict(font->descriptor,
- pdf_new_name("FontName"),
- pdf_new_name(fontname));
- pdf_add_dict(font->resource,
- pdf_new_name("BaseFont"),
- pdf_new_name(fontname));
{
pdf_obj *csi_dict = pdf_new_dict();
pdf_add_dict(csi_dict,
diff --git a/Build/source/texk/dvipdfm-x/cidtype2.c b/Build/source/texk/dvipdfm-x/cidtype2.c
index 899ae2202f6..90194db3493 100644
--- a/Build/source/texk/dvipdfm-x/cidtype2.c
+++ b/Build/source/texk/dvipdfm-x/cidtype2.c
@@ -439,10 +439,10 @@ fix_CJK_symbols (unsigned short code)
static int32_t
cid_to_code (CMap *cmap, CID cid, int unicode_cmap)
{
- unsigned char inbuf[2], outbuf[32];
- int inbytesleft = 2, outbytesleft = 32;
+ unsigned char inbuf[2], outbuf[32];
+ int inbytesleft = 2, outbytesleft = 32;
const unsigned char *p;
- unsigned char *q;
+ unsigned char *q;
if (!cmap)
return cid;
@@ -479,6 +479,29 @@ cid_to_code (CMap *cmap, CID cid, int unicode_cmap)
return -1;
}
+static uint16_t
+cid_to_gid (CMap *cmap, CID cid)
+{
+ unsigned char inbuf[2], outbuf[2];
+ int inbytesleft = 2, outbytesleft = 2;
+ const unsigned char *p;
+ unsigned char *q;
+
+ if (!cmap)
+ return cid;
+
+ inbuf[0] = (cid >> 8) & 0xff;
+ inbuf[1] = cid & 0xff;
+ p = inbuf; q = outbuf;
+
+ CMap_decode_char(cmap, &p, &inbytesleft, &q, &outbytesleft);
+
+ if (inbytesleft != 0 || outbytesleft != 0)
+ return 0;
+
+ return (uint16_t) (outbuf[0] << 8|outbuf[1]);
+}
+
/* #define NO_GHOSTSCRIPT_BUG 1 */
int
@@ -494,7 +517,12 @@ CIDFont_type2_dofont (pdf_font *font)
CID cid, last_cid;
unsigned char *cidtogidmap;
USHORT num_glyphs;
- int i, glyph_ordering = 0, unicode_cmap = 0;
+ enum {
+ glyph_ordering,
+ via_cid_to_code,
+ via_cid_to_gid,
+ } maptype = via_cid_to_code;
+ int i, unicode_cmap = 0;
FILE *fp = NULL;
if (!font->reference)
@@ -592,51 +620,65 @@ CIDFont_type2_dofont (pdf_font *font)
*/
if (!strcmp(font->cid.csi.registry, "Adobe") &&
!strcmp(font->cid.csi.ordering, "Identity")) {
- glyph_ordering = 1;
- } else {
- glyph_ordering = 0;
- }
-
- /*
- * Select TrueType cmap table, find ToCode CMap for each TrueType encodings.
- */
- if (glyph_ordering) {
- ttcmap = NULL;
- cmap = NULL;
- } else {
- /*
- * This part contains a bug. It may choose SJIS encoding TrueType cmap
- * table for Adobe-GB1.
- */
- for (i = 0; i <= KNOWN_ENCODINGS_MAX; i++) {
- ttcmap = tt_cmap_read(sfont,
- known_encodings[i].platform,
- known_encodings[i].encoding);
- if (ttcmap)
- break;
- }
- if (!ttcmap) {
- WARN("No usable TrueType cmap table found for font \"%s\".", font->filename);
- WARN("CID character collection for this font is set to \"%s-%s\"",
- font->cid.csi.registry, font->cid.csi.ordering);
- WARN("Cannot continue without this...");
- sfnt_close(sfont);
- DPXFCLOSE(fp);
- return -1;
- } else if (i <= WIN_UCS_INDEX_MAX) {
- unicode_cmap = 1;
- } else {
- unicode_cmap = 0;
+ maptype = glyph_ordering;
+ ttcmap = NULL;
+ cmap = NULL;
+ } else {
+ if (font->cid.csi.registry && font->cid.csi.ordering) {
+ char *cmap_name;
+ size_t len;
+ int cmap_id;
+
+ len = strlen(font->cid.csi.registry) + strlen(font->cid.csi.ordering);
+ len += strlen(font->fontname);
+ len += 3;
+ cmap_name = NEW(len+1, char);
+ snprintf(cmap_name, len + 1, "%s-%s-%s",
+ font->cid.csi.registry, font->cid.csi.ordering, font->fontname);
+ cmap_id = CMap_cache_find(cmap_name);
+ RELEASE(cmap_name);
+ if (cmap_id >= 0) {
+ cmap = CMap_cache_get(cmap_id);
+ ttcmap = NULL;
+ maptype = via_cid_to_gid;
+ }
}
-
- if (!strcmp(font->cid.csi.ordering, "UCS") && i <= WIN_UCS_INDEX_MAX) {
- cmap = NULL;
- } else {
- cmap = find_tocode_cmap(font->cid.csi.registry, font->cid.csi.ordering, i);
- if (!cmap) {
+ if (maptype != via_cid_to_gid) {
+ maptype = via_cid_to_code;
+ /*
+ * This part contains a bug. It may choose SJIS encoding TrueType cmap
+ * table for Adobe-GB1.
+ */
+ for (i = 0; i <= KNOWN_ENCODINGS_MAX; i++) {
+ ttcmap = tt_cmap_read(sfont,
+ known_encodings[i].platform,
+ known_encodings[i].encoding);
+ if (ttcmap)
+ break;
+ }
+ if (!ttcmap) {
+ WARN("No usable TrueType cmap table found for font \"%s\".", font->filename);
+ WARN("CID character collection for this font is set to \"%s-%s\"",
+ font->cid.csi.registry, font->cid.csi.ordering);
+ WARN("Cannot continue without this...");
sfnt_close(sfont);
DPXFCLOSE(fp);
- return -1;
+ return -1;
+ } else if (i <= WIN_UCS_INDEX_MAX) {
+ unicode_cmap = 1;
+ } else {
+ unicode_cmap = 0;
+ }
+
+ if (!strcmp(font->cid.csi.ordering, "UCS") && i <= WIN_UCS_INDEX_MAX) {
+ cmap = NULL;
+ } else {
+ cmap = find_tocode_cmap(font->cid.csi.registry, font->cid.csi.ordering, i);
+ if (!cmap) {
+ sfnt_close(sfont);
+ DPXFCLOSE(fp);
+ return -1;
+ }
}
}
}
@@ -708,10 +750,16 @@ CIDFont_type2_dofont (pdf_font *font)
if (!is_used_char2(h_used_chars, cid))
continue;
- if (glyph_ordering) {
+ switch (maptype) {
+ case glyph_ordering:
gid = cid;
code = cid;
- } else {
+ break;
+ case via_cid_to_gid:
+ gid = cid_to_gid(cmap, cid);
+ code = cid;
+ break;
+ case via_cid_to_code:
code = cid_to_code(cmap, cid, unicode_cmap);
if (code < 0) {
WARN("Unable to map CID to code: CID=%u", cid);
@@ -731,6 +779,7 @@ CIDFont_type2_dofont (pdf_font *font)
}
#endif /* FIX_CJK_UNIOCDE_SYMBOLS */
}
+ break;
}
if (gid == 0) {
if (code >= 0)
@@ -759,7 +808,7 @@ CIDFont_type2_dofont (pdf_font *font)
/*
* Require `vrt2' or `vert'.
*/
- if (glyph_ordering) {
+ if (maptype != via_cid_to_code) {
gsub_list = NULL;
} else {
gsub_list = otl_gsub_new();
@@ -791,10 +840,16 @@ CIDFont_type2_dofont (pdf_font *font)
continue;
}
- if (glyph_ordering) {
+ switch (maptype) {
+ case glyph_ordering:
gid = cid;
code = cid;
- } else {
+ break;
+ case via_cid_to_gid:
+ gid = cid_to_gid(cmap, cid);
+ code = cid;
+ break;
+ case via_cid_to_code:
code = cid_to_code(cmap, cid, unicode_cmap);
if (code < 0) {
WARN("Unable to map CID to code: CID=%u", cid);
@@ -814,6 +869,7 @@ CIDFont_type2_dofont (pdf_font *font)
}
#endif /* FIX_CJK_UNIOCDE_SYMBOLS */
}
+ break;
}
if (gid == 0) {
if (code >= 0)
@@ -1099,14 +1155,19 @@ CIDFont_type2_open (pdf_font *font, const char *name, int index, cid_opt *opt)
}
if (opt->embed) {
- memmove(fontname + 7, fontname, strlen(fontname) + 1);
- pdf_font_make_uniqueTag(fontname);
- fontname[6] = '+';
+ char *tmp;
+
+ pdf_font_make_uniqueTag(font->uniqueID);
+ tmp = NEW(strlen(fontname)+8, char);
+ sprintf(tmp, "%s+%s", font->uniqueID, font->fontname);
+ pdf_add_dict(font->descriptor, pdf_new_name("FontName"), pdf_new_name(tmp));
+ pdf_add_dict(font->resource, pdf_new_name("BaseFont"), pdf_new_name(tmp));
+ RELEASE(tmp);
+ } else {
+ pdf_add_dict(font->descriptor, pdf_new_name("FontName"), pdf_new_name(font->fontname));
+ pdf_add_dict(font->resource, pdf_new_name("BaseFont"), pdf_new_name(font->fontname));
}
- pdf_add_dict(font->descriptor, pdf_new_name("FontName"), pdf_new_name(fontname));
- pdf_add_dict(font->resource, pdf_new_name("BaseFont"), pdf_new_name(fontname));
-
sfnt_close(sfont);
if (fp)
DPXFCLOSE(fp);
diff --git a/Build/source/texk/dvipdfm-x/configure b/Build/source/texk/dvipdfm-x/configure
index ec83ce19801..7f92c3b8279 100755
--- a/Build/source/texk/dvipdfm-x/configure
+++ b/Build/source/texk/dvipdfm-x/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for dvipdfm-x (TeX Live) 20201014.
+# Generated by GNU Autoconf 2.69 for dvipdfm-x (TeX Live) 20201019.
#
# Report bugs to <dvipdfmx@tug.org>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='dvipdfm-x (TeX Live)'
PACKAGE_TARNAME='dvipdfm-x--tex-live-'
-PACKAGE_VERSION='20201014'
-PACKAGE_STRING='dvipdfm-x (TeX Live) 20201014'
+PACKAGE_VERSION='20201019'
+PACKAGE_STRING='dvipdfm-x (TeX Live) 20201019'
PACKAGE_BUGREPORT='dvipdfmx@tug.org'
PACKAGE_URL=''
@@ -1350,7 +1350,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures dvipdfm-x (TeX Live) 20201014 to adapt to many kinds of systems.
+\`configure' configures dvipdfm-x (TeX Live) 20201019 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1421,7 +1421,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20201014:";;
+ short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20201019:";;
esac
cat <<\_ACEOF
@@ -1551,7 +1551,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-dvipdfm-x (TeX Live) configure 20201014
+dvipdfm-x (TeX Live) configure 20201019
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2390,7 +2390,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by dvipdfm-x (TeX Live) $as_me 20201014, which was
+It was created by dvipdfm-x (TeX Live) $as_me 20201019, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -8077,7 +8077,7 @@ fi
# Define the identity of the package.
PACKAGE='dvipdfm-x--tex-live-'
- VERSION='20201014'
+ VERSION='20201019'
cat >>confdefs.h <<_ACEOF
@@ -14746,7 +14746,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-dvipdfm-x (TeX Live) config.lt 20201014
+dvipdfm-x (TeX Live) config.lt 20201019
configured by $0, generated by GNU Autoconf 2.69.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -16636,7 +16636,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by dvipdfm-x (TeX Live) $as_me 20201014, which was
+This file was extended by dvipdfm-x (TeX Live) $as_me 20201019, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16706,7 +16706,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-dvipdfm-x (TeX Live) config.status 20201014
+dvipdfm-x (TeX Live) config.status 20201019
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/texk/dvipdfm-x/configure.ac b/Build/source/texk/dvipdfm-x/configure.ac
index 70ffd410dd0..7e24d5da8be 100644
--- a/Build/source/texk/dvipdfm-x/configure.ac
+++ b/Build/source/texk/dvipdfm-x/configure.ac
@@ -8,7 +8,7 @@ dnl This file is free software; the copyright holder
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
-AC_INIT([dvipdfm-x (TeX Live)], [20201014], [dvipdfmx@tug.org])
+AC_INIT([dvipdfm-x (TeX Live)], [20201019], [dvipdfmx@tug.org])
AC_PREREQ([2.65])
AC_CONFIG_SRCDIR([agl.c])
AC_CONFIG_AUX_DIR([../../build-aux])
diff --git a/Build/source/texk/dvipdfm-x/data/Adobe-Japan1-YuMincho-Regular b/Build/source/texk/dvipdfm-x/data/Adobe-Japan1-YuMincho-Regular
new file mode 100644
index 00000000000..5f7a57a26cd
--- /dev/null
+++ b/Build/source/texk/dvipdfm-x/data/Adobe-Japan1-YuMincho-Regular
@@ -0,0 +1,135 @@
+%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (Adobe-Japan1-YuMincho-Regular)
+%%Title: (Adobe-Japan1-YuMincho-Regular Adobe Japan1 7)
+%%Version: 1.000
+%%EndComments
+
+/CIDInit /ProcSet findresource begin
+
+12 dict begin
+
+begincmap
+
+/CIDSystemInfo 3 dict dup begin
+ /Registry (Adobe) def
+ /Ordering (Adobe_Japan1_YuMincho_Regular) def
+ /Supplement 7 def
+end def
+
+/CMapName /Adobe-Japan1-YuMincho-Regular def
+/CMapVersion 1.000 def
+/CMapType 2 def
+
+/WMode 0 def
+
+1 begincodespacerange
+ <0000> <5AFF>
+endcodespacerange
+
+1 beginbfchar
+<0000> <0000>
+endbfchar
+
+91 beginbfrange
+<0001> <00ff> <0003>
+<0100> <01ff> <0102>
+<0200> <02ff> <0202>
+<0300> <03ff> <0302>
+<0400> <04ff> <0402>
+<0500> <05ff> <0502>
+<0600> <06ff> <0602>
+<0700> <07ff> <0702>
+<0800> <08ff> <0802>
+<0900> <09ff> <0902>
+<0a00> <0aff> <0a02>
+<0b00> <0bff> <0b02>
+<0c00> <0cff> <0c02>
+<0d00> <0dff> <0d02>
+<0e00> <0eff> <0e02>
+<0f00> <0fff> <0f02>
+<1000> <10ff> <1002>
+<1100> <11ff> <1102>
+<1200> <12ff> <1202>
+<1300> <13ff> <1302>
+<1400> <14ff> <1402>
+<1500> <15ff> <1502>
+<1600> <16ff> <1602>
+<1700> <17ff> <1702>
+<1800> <18ff> <1802>
+<1900> <19ff> <1902>
+<1a00> <1aff> <1a02>
+<1b00> <1bff> <1b02>
+<1c00> <1cff> <1c02>
+<1d00> <1dff> <1d02>
+<1e00> <1eff> <1e02>
+<1f00> <1fff> <1f02>
+<2000> <20ff> <2002>
+<2100> <21ff> <2102>
+<2200> <22ff> <2202>
+<2300> <23ff> <2302>
+<2400> <24ff> <2402>
+<2500> <25ff> <2502>
+<2600> <26ff> <2602>
+<2700> <27ff> <2702>
+<2800> <28ff> <2802>
+<2900> <29ff> <2902>
+<2a00> <2aff> <2a02>
+<2b00> <2bff> <2b02>
+<2c00> <2cff> <2c02>
+<2d00> <2dff> <2d02>
+<2e00> <2eff> <2e02>
+<2f00> <2fff> <2f02>
+<3000> <30ff> <3002>
+<3100> <31ff> <3102>
+<3200> <32ff> <3202>
+<3300> <33ff> <3302>
+<3400> <34ff> <3402>
+<3500> <35ff> <3502>
+<3600> <36ff> <3602>
+<3700> <37ff> <3702>
+<3800> <38ff> <3802>
+<3900> <39ff> <3902>
+<3a00> <3aff> <3a02>
+<3b00> <3bff> <3b02>
+<3c00> <3cff> <3c02>
+<3d00> <3dff> <3d02>
+<3e00> <3eff> <3e02>
+<3f00> <3fff> <3f02>
+<4000> <40ff> <4002>
+<4100> <41ff> <4102>
+<4200> <42ff> <4202>
+<4300> <43ff> <4302>
+<4400> <44ff> <4402>
+<4500> <45ff> <4502>
+<4600> <46ff> <4602>
+<4700> <47ff> <4702>
+<4800> <48ff> <4802>
+<4900> <49ff> <4902>
+<4a00> <4aff> <4a02>
+<4b00> <4bff> <4b02>
+<4c00> <4cff> <4c02>
+<4d00> <4dff> <4d02>
+<4e00> <4eff> <4e02>
+<4f00> <4fff> <4f02>
+<5000> <50ff> <5002>
+<5100> <51ff> <5102>
+<5200> <52ff> <5202>
+<5300> <53ff> <5302>
+<5400> <54ff> <5402>
+<5500> <55ff> <5502>
+<5600> <56ff> <5602>
+<5700> <57ff> <5702>
+<5800> <58ff> <5802>
+<5900> <59ff> <5902>
+<5a00> <5a13> <5a02>
+endbfrange
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+
+%%EndResource
+%%EOF
+
diff --git a/Build/source/texk/dvipdfm-x/data/dvipdfmx.cfg b/Build/source/texk/dvipdfm-x/data/dvipdfmx.cfg
index 2e8b937dc8a..2f10e13536c 100644
--- a/Build/source/texk/dvipdfm-x/data/dvipdfmx.cfg
+++ b/Build/source/texk/dvipdfm-x/data/dvipdfmx.cfg
@@ -156,7 +156,7 @@ P 0x003C
%% kpsewhich -progname=dvipdfmx -format='other text files' dvipdfmx.cfg
%% and control which one is found by setting DVIPDFMXINPUTS.
%%
-D "rungs -q -dDELAYSAFER -dNOPAUSE -dBATCH -dEPSCrop -sPAPERSIZE=a0 -sDEVICE=pdfwrite -dCompatibilityLevel=%v -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dAutoRotatePages=/None -sOutputFile='%o' '%i' -c quit"
+D "rungs -q -dALLOWPSTRANSPARENCY -dDELAYSAFER -dNOPAUSE -dBATCH -dEPSCrop -sPAPERSIZE=a0 -sDEVICE=pdfwrite -dCompatibilityLevel=%v -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dAutoRotatePages=/None -sOutputFile='%o' '%i' -c quit"
% other random ps converters people have experimented with.
%D "/usr/local/bin/ps2pdf -dEPSCrop '%i' '%o'"
diff --git a/Build/source/texk/dvipdfm-x/type0.c b/Build/source/texk/dvipdfm-x/type0.c
index 06699112945..09d161df6ae 100644
--- a/Build/source/texk/dvipdfm-x/type0.c
+++ b/Build/source/texk/dvipdfm-x/type0.c
@@ -112,9 +112,6 @@ Type0Font_attach_ToUnicode_stream (pdf_font *font)
tounicode = NULL;
csi = &cidfont->cid.csi;
fontname = cidfont->fontname;
- if (cidfont->cid.options.embed) {
- fontname += 7; /* FIXME: Skip pseudo unique tag... */
- }
switch (cidfont->subtype) {
case PDF_FONT_FONTTYPE_CIDTYPE2:
@@ -191,13 +188,16 @@ pdf_font_open_type0 (pdf_font *font, int cid_id, int wmode)
* Type0 font's fontname is usually descendant CID-keyed font's font name
* appended by -ENCODING.
*/
- fontname = cidfont->fontname;
+ if (cidfont->cid.options.embed) {
+ fontname = NEW(strlen(cidfont->fontname)+8, char);
+ sprintf(fontname, "%s+%s", cidfont->uniqueID, cidfont->fontname);
+ } else {
+ fontname = NEW(strlen(cidfont->fontname)+1, char);
+ strcpy(fontname, cidfont->fontname);
+ }
if (dpx_conf.verbose_level > 0) {
- if (cidfont->cid.options.embed && strlen(fontname) > 7)
- MESG("(CID:%s)", fontname+7); /* skip XXXXXX+ */
- else
- MESG("(CID:%s)", fontname);
+ MESG("(CID:%s)", cidfont->fontname);
}
switch (cidfont->subtype) {