diff options
Diffstat (limited to 'Build/source/texk/xdvipdfmx/src/fontmap.c')
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/fontmap.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Build/source/texk/xdvipdfmx/src/fontmap.c b/Build/source/texk/xdvipdfmx/src/fontmap.c index 87f8996c702..85fe6b953fd 100644 --- a/Build/source/texk/xdvipdfmx/src/fontmap.c +++ b/Build/source/texk/xdvipdfmx/src/fontmap.c @@ -1136,10 +1136,15 @@ pdf_load_native_font_from_path(const char *ps_name, int layout_dir, int extend, index = index * 10 + *p++ - '0'; } - if ( (q = dpx_find_opentype_file(filename)) != NULL + /* try loading the filename directly */ + error = FT_New_Face(ftLib, filename, index, &face); + + /* if failed, try locating the file in the TEXMF tree */ + if ( error && + ( (q = dpx_find_opentype_file(filename)) != NULL || (q = dpx_find_truetype_file(filename)) != NULL || (q = dpx_find_type1_file(filename)) != NULL - || (q = dpx_find_dfont_file(filename)) != NULL) { + || (q = dpx_find_dfont_file(filename)) != NULL) ) { error = FT_New_Face(ftLib, q, index, &face); RELEASE(q); } |