diff options
Diffstat (limited to 'Build/source/texk/dvipdfm-x/tt_cmap.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/tt_cmap.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/Build/source/texk/dvipdfm-x/tt_cmap.c b/Build/source/texk/dvipdfm-x/tt_cmap.c index 86689d677af..a32f1752136 100644 --- a/Build/source/texk/dvipdfm-x/tt_cmap.c +++ b/Build/source/texk/dvipdfm-x/tt_cmap.c @@ -1198,6 +1198,7 @@ static cmap_plat_enc_rec cmap_plat_encs[] = { pdf_obj * otf_create_ToUnicode_stream (const char *font_name, int ttc_index, /* 0 for non-TTC */ + const char *basefont, const char *used_chars, int cmap_id) { @@ -1214,19 +1215,8 @@ otf_create_ToUnicode_stream (const char *font_name, ULONG offset = 0; int i, cmap_type; - /* replace slash in map name with dash to make the output cmap name valid, - * happens when XeTeX embeds full font path - * https://sourceforge.net/p/xetex/bugs/52/ - */ - normalized_font_name = NEW(strlen(font_name)+1, char); - strcpy(normalized_font_name, font_name); - for (i = 0; i < strlen(font_name); ++i) { - if (normalized_font_name[i] == '/') - normalized_font_name[i] = '-'; - } - - cmap_name = NEW(strlen(font_name)+strlen("-UTF16")+5, char); - sprintf(cmap_name, "%s,%03d-UTF16", normalized_font_name, ttc_index); + cmap_name = NEW(strlen(basefont)+strlen("-UTF16")+1, char); + sprintf(cmap_name, "%s-UTF16", basefont); res_id = pdf_findresource("CMap", cmap_name); if (res_id >= 0) { |