summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/dvi.c
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2015-02-21 19:37:28 +0000
committerKhaled Hosny <khaledhosny@eglug.org>2015-02-21 19:37:28 +0000
commit1492fca62bda37ab26dc864e19c49cfabc909969 (patch)
tree62fcdb18601511ba14976ed7a1537193919c326b /Build/source/texk/dvipdfm-x/dvi.c
parent26d05f98df73cfe45cccdfa13ba70975b5e1a9df (diff)
Return the newly inserted fontmap record
git-svn-id: svn://tug.org/texlive/trunk@36343 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/dvi.c')
-rw-r--r--Build/source/texk/dvipdfm-x/dvi.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Build/source/texk/dvipdfm-x/dvi.c b/Build/source/texk/dvipdfm-x/dvi.c
index 13833ed1b21..33eab251ae5 100644
--- a/Build/source/texk/dvipdfm-x/dvi.c
+++ b/Build/source/texk/dvipdfm-x/dvi.c
@@ -951,12 +951,9 @@ dvi_locate_native_font (const char *filename, uint32_t index,
sprintf(fontmap_key, "%s/%u/%c/%d/%d/%d", path, index, layout_dir == 0 ? 'H' : 'V', extend, slant, embolden);
mrec = pdf_lookup_fontmap_record(fontmap_key);
if (mrec == NULL) {
- if (pdf_insert_native_fontmap_record(path, index, layout_dir, extend, slant, embolden) == -1) {
+ if ((mrec = pdf_insert_native_fontmap_record(path, index, layout_dir, extend, slant, embolden)) == NULL) {
ERROR("Cannot proceed without the font: %s", filename);
}
- mrec = pdf_lookup_fontmap_record(fontmap_key);
- /* FIXME: would be more efficient if pdf_load_native_font returned the mrec ptr (or NULL for error)
- so we could avoid doing a second lookup for the item we just inserted */
}
memset(&loaded_fonts[cur_id], 0, sizeof (struct loaded_font));