summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2022-06-15 05:15:38 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2022-06-15 05:15:38 +0000
commitf33901b389d4b5a3b1b072558171bb4a6deb8067 (patch)
tree3a80e006140fe14ef43be904a9044f2555002e1c /Build
parent78ef1388a5e84428bc12a67845b28229d7832a6b (diff)
dvipdfmx: support some TrueType fonts in macOS which use 0-4 cmap (from Clerk Ma)
git-svn-id: svn://tug.org/texlive/trunk@63601 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dvipdfm-x/ChangeLog5
-rw-r--r--Build/source/texk/dvipdfm-x/cidtype2.c3
-rw-r--r--Build/source/texk/dvipdfm-x/tt_cmap.c4
3 files changed, 11 insertions, 1 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog
index feb38e1fe7a..c5b38644bce 100644
--- a/Build/source/texk/dvipdfm-x/ChangeLog
+++ b/Build/source/texk/dvipdfm-x/ChangeLog
@@ -1,3 +1,8 @@
+2022-06-15 Clerk Ma <maqiyuan130324@vip.qq.com>
+
+ * cidtype2.c, tt_cmap.c: Support some TrueType fonts in macOS
+ which use 0-4 cmap.
+
2022-06-13 Akira Kakuto <kakuto@jcom.zaq.ne.jp>
* pdfximage.c: Fix a bug due to an uninitialized variable
diff --git a/Build/source/texk/dvipdfm-x/cidtype2.c b/Build/source/texk/dvipdfm-x/cidtype2.c
index 11554b47780..15db9c5b7ad 100644
--- a/Build/source/texk/dvipdfm-x/cidtype2.c
+++ b/Build/source/texk/dvipdfm-x/cidtype2.c
@@ -147,7 +147,7 @@ validate_name (char *fontname, int len)
*/
#define WIN_UCS_INDEX_MAX 1
-#define KNOWN_ENCODINGS_MAX 9
+#define KNOWN_ENCODINGS_MAX 10
static struct
{
unsigned short platform;
@@ -164,6 +164,7 @@ static struct
{TT_MAC, TT_MAC_TRADITIONAL_CHINESE, {"B5pc", NULL}},
{TT_MAC, TT_MAC_SIMPLIFIED_CHINESE, {"GBpc-EUC", NULL}},
{TT_MAC, TT_MAC_KOREAN, {"KSCpc-EUC", NULL}},
+ {0, 4, {"UCSms-UCS4", "UCSms-UCS2", "UCS4", "UCS2", NULL}},
{0, 0, {NULL}}
};
diff --git a/Build/source/texk/dvipdfm-x/tt_cmap.c b/Build/source/texk/dvipdfm-x/tt_cmap.c
index cb8afb69812..79bdab2815f 100644
--- a/Build/source/texk/dvipdfm-x/tt_cmap.c
+++ b/Build/source/texk/dvipdfm-x/tt_cmap.c
@@ -1059,6 +1059,7 @@ typedef struct {
static cmap_plat_enc_rec cmap_plat_encs[] = {
{ 3, 10 },
{ 0, 3 },
+ { 0, 4 },
{ 0, 0 },
{ 3, 1 },
{ 0, 1 }
@@ -1480,6 +1481,9 @@ otf_load_Unicode_CMap (const char *map_name, uint32_t ttc_index, /* 0 for non-TT
ttcmap = tt_cmap_read(sfont, 3, 1); /* Microsoft UCS2 */
if (!ttcmap) {
ttcmap = tt_cmap_read(sfont, 0, 3); /* Unicode 2.0 or later */
+ if (!ttcmap) {
+ ttcmap = tt_cmap_read(sfont, 0, 4);
+ }
}
}