summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfmx/src/tt_cmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dvipdfmx/src/tt_cmap.c')
-rw-r--r--Build/source/texk/dvipdfmx/src/tt_cmap.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/Build/source/texk/dvipdfmx/src/tt_cmap.c b/Build/source/texk/dvipdfmx/src/tt_cmap.c
index e938e61b80d..ff1aa9ba664 100644
--- a/Build/source/texk/dvipdfmx/src/tt_cmap.c
+++ b/Build/source/texk/dvipdfmx/src/tt_cmap.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/tt_cmap.c,v 1.25 2007/04/13 06:48:03 chofchof Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/tt_cmap.c,v 1.26 2008/05/08 18:51:59 chofchof Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -1598,7 +1598,7 @@ otf_load_Unicode_CMap (const char *map_name, int ttc_index, /* 0 for non-TTC fon
int cmap_id = -1;
int tounicode_id = -1, is_cidfont = 0;
sfnt *sfont;
- long offset = 0;
+ unsigned long offset = 0;
char *base_name = NULL, *cmap_name = NULL;
char *tounicode_name = NULL;
FILE *fp;
@@ -1619,12 +1619,16 @@ otf_load_Unicode_CMap (const char *map_name, int ttc_index, /* 0 for non-TTC fon
if (!fp) {
fp = DPXFOPEN(map_name, DPX_RES_TYPE_OTFONT);
}
- if (!fp)
- return -1;
+ if (!fp) {
+ fp = DPXFOPEN(map_name, DPX_RES_TYPE_DFONT);
+ if (!fp) return -1;
+ sfont = dfont_open(fp, ttc_index);
+ } else {
+ sfont = sfnt_open(fp);
+ }
- sfont = sfnt_open(fp);
if (!sfont) {
- ERROR("Could not open OpenType/TrueType font file \"%s\"", map_name);
+ ERROR("Could not open OpenType/TrueType/dfont font file \"%s\"", map_name);
}
switch (sfont->type) {
case SFNT_TYPE_TTC:
@@ -1637,6 +1641,9 @@ otf_load_Unicode_CMap (const char *map_name, int ttc_index, /* 0 for non-TTC fon
case SFNT_TYPE_POSTSCRIPT:
offset = 0;
break;
+ case SFNT_TYPE_DFONT:
+ offset = sfont->offset;
+ break;
default:
ERROR("Not a OpenType/TrueType/TTC font?: %s", map_name);
break;