diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2013-02-21 23:44:55 +0000 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2013-02-21 23:44:55 +0000 |
commit | 62f69243c4e9c8c098040e43607a312a5923cb83 (patch) | |
tree | 8c42ef115e5fe1501c5e043feb04243a92cea0a4 /Build/source/texk/xdvipdfmx/src | |
parent | 33a33a9400fd462244a0fe4c2abd4cb41bfea5d2 (diff) |
Fix loading font files without an extension
git-svn-id: svn://tug.org/texlive/trunk@29191 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/xdvipdfmx/src')
-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); } |