diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2014-07-29 09:20:42 +0000 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2014-07-29 09:20:42 +0000 |
commit | e0d2937997ad59c6b13d14c7e47540b9ea11a7e4 (patch) | |
tree | 705e1efb5d085496d0406cf017e687914df24453 /Build/source | |
parent | 117d1038285bced4517dbc0313a0bb3f799961ed (diff) |
Fix crash in fonts with no font map entry
The unit test does not actually work, no idea why the dvipdfmx can not
found the xbmc10.tfm file!
git-svn-id: svn://tug.org/texlive/trunk@34767 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/dvipdfm-x/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/Makefile.am | 3 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/Makefile.in | 5 | ||||
-rwxr-xr-x | Build/source/texk/dvipdfm-x/dvipdfmx.test | 5 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/pdfdev.c | 3 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/tests/xbmc.dvi | bin | 0 -> 252 bytes | |||
-rw-r--r-- | Build/source/texk/dvipdfm-x/tests/xbmc.tex | 1 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/tests/xbmc10.tfm | bin | 0 -> 1328 bytes | |||
-rwxr-xr-x | Build/source/texk/dvipdfm-x/xdvipdfmx.test | 5 |
9 files changed, 23 insertions, 5 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index 253a51998f3..45e8b96f83e 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -1,4 +1,4 @@ -2014-07-28 Khaled Hosny <khaledhosny@eglug.org> +2014-07-29 Khaled Hosny <khaledhosny@eglug.org> * spc_pdfm.c: remove the #ifdef ENABLE_TOUNICODE as it is always true. * spc_pdfm.c: rename my_parse_pdf_dict to @@ -13,6 +13,10 @@ * dvi.c, dvipdfmx.c, dvipdfmx.h, spc_pdfm.c: Rename is_xetex to is_xdv and set it to 1 when DVI id equals XDV_ID. + * pdfdev.c (pdf_dev_locate_font): Don't crash if mrec is None. + * dvipdfm.test, xdvipdfm.test, tests/xbmc10.{dvi,tex}, Makefile.am: + Test the above bug. + 2014-07-28 Jiang Jiang <gzjjgod@gmail.com> diff --git a/Build/source/texk/dvipdfm-x/Makefile.am b/Build/source/texk/dvipdfm-x/Makefile.am index f651383e9af..73dd65cdb0e 100644 --- a/Build/source/texk/dvipdfm-x/Makefile.am +++ b/Build/source/texk/dvipdfm-x/Makefile.am @@ -302,4 +302,5 @@ EXTRA_DIST += tests/image.dvi tests/image.tex EXTRA_DIST += tests/cmr10.pfb tests/cmr10.tfm tests/annot.dvi tests/annot.tex EXTRA_DIST += tests/bookm.dvi tests/bookm.tex tests/paper.dvi tests/paper.tex EXTRA_DIST += tests/resrc.dvi tests/resrc.tex -DISTCLEANFILES += img*.* pic*.* image*.pdf annot*.pdf bookm*.pdf paper*.pdf resrc*.pdf +EXTRA_DIST += tests/xbmc.dvi tests/xbmc.tex tests/xbmc10.tfm +DISTCLEANFILES += img*.* pic*.* image*.pdf annot*.pdf bookm*.pdf paper*.pdf resrc*.pdf xbmc.pdf diff --git a/Build/source/texk/dvipdfm-x/Makefile.in b/Build/source/texk/dvipdfm-x/Makefile.in index ad0708f4611..78c3c906940 100644 --- a/Build/source/texk/dvipdfm-x/Makefile.in +++ b/Build/source/texk/dvipdfm-x/Makefile.in @@ -801,7 +801,7 @@ dist_mapdata_DATA = data/cid-x.map cmapdatadir = $(datarootdir)/texmf-dist/fonts/cmap/dvipdfmx dist_cmapdata_DATA = data/EUC-UCS2 DISTCLEANFILES = config.force img*.* pic*.* image*.pdf annot*.pdf \ - bookm*.pdf paper*.pdf resrc*.pdf + bookm*.pdf paper*.pdf resrc*.pdf xbmc.pdf TESTS = $(am__append_6) $(am__append_7) dvipdfmx_tests = dvipdfmx.test dvipdfm-ann.test dvipdfm-bb.test \ dvipdfm-bkm.test dvipdfm-psz.test dvipdfm-res.test @@ -817,7 +817,8 @@ EXTRA_DIST = $(dvipdfmx_tests) $(xdvipdfmx_tests) tests/dvipdfmx.cfg \ tests/image.dvi tests/image.tex tests/cmr10.pfb \ tests/cmr10.tfm tests/annot.dvi tests/annot.tex \ tests/bookm.dvi tests/bookm.tex tests/paper.dvi \ - tests/paper.tex tests/resrc.dvi tests/resrc.tex + tests/paper.tex tests/resrc.dvi tests/resrc.tex tests/xbmc.dvi \ + tests/xbmc.tex tests/xbmc10.tfm all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am diff --git a/Build/source/texk/dvipdfm-x/dvipdfmx.test b/Build/source/texk/dvipdfm-x/dvipdfmx.test index fc5ae188d94..72c6a18229a 100755 --- a/Build/source/texk/dvipdfm-x/dvipdfmx.test +++ b/Build/source/texk/dvipdfm-x/dvipdfmx.test @@ -27,6 +27,11 @@ echo "*** dvipdfmx -v -o image1.pdf image" && echo \ && echo && echo "dvipdfmx-image tests OK" && echo \ || failed="$failed dvipdfmx-image" +echo "*** dvipdfmx -v xbmc" && echo \ + && ./dvipdfmx -v $srcdir/tests/xbmc \ + && echo && echo "dvipdfmx-xbmc tests OK" && echo \ + || failed="$failed dvipdfmx-xbmc" + test -z "$failed" && exit 0 echo echo "failed tests:$failed" diff --git a/Build/source/texk/dvipdfm-x/pdfdev.c b/Build/source/texk/dvipdfm-x/pdfdev.c index 6c0c5d7c7c3..6c2d1c5b4f3 100644 --- a/Build/source/texk/dvipdfm-x/pdfdev.c +++ b/Build/source/texk/dvipdfm-x/pdfdev.c @@ -1505,7 +1505,8 @@ pdf_dev_locate_font (const char *font_name, spt_t ptsize) if (font->font_id < 0) return -1; - font->cff_charsets = mrec->opt.cff_charsets; + if (mrec) + font->cff_charsets = mrec->opt.cff_charsets; /* We found device font here. */ if (i < num_dev_fonts) { diff --git a/Build/source/texk/dvipdfm-x/tests/xbmc.dvi b/Build/source/texk/dvipdfm-x/tests/xbmc.dvi Binary files differnew file mode 100644 index 00000000000..eddae94621a --- /dev/null +++ b/Build/source/texk/dvipdfm-x/tests/xbmc.dvi diff --git a/Build/source/texk/dvipdfm-x/tests/xbmc.tex b/Build/source/texk/dvipdfm-x/tests/xbmc.tex new file mode 100644 index 00000000000..99a94cdb1fb --- /dev/null +++ b/Build/source/texk/dvipdfm-x/tests/xbmc.tex @@ -0,0 +1 @@ +\font\revrm=xbmc10\revrm E\bye diff --git a/Build/source/texk/dvipdfm-x/tests/xbmc10.tfm b/Build/source/texk/dvipdfm-x/tests/xbmc10.tfm Binary files differnew file mode 100644 index 00000000000..04f6429540e --- /dev/null +++ b/Build/source/texk/dvipdfm-x/tests/xbmc10.tfm diff --git a/Build/source/texk/dvipdfm-x/xdvipdfmx.test b/Build/source/texk/dvipdfm-x/xdvipdfmx.test index c20b8e27df8..51688143cdc 100755 --- a/Build/source/texk/dvipdfm-x/xdvipdfmx.test +++ b/Build/source/texk/dvipdfm-x/xdvipdfmx.test @@ -26,6 +26,11 @@ echo "*** xdvipdfmx -v -o image2.pdf image" && echo \ && echo && echo "xdvipdfmx-image tests OK" && echo \ || failed="$failed xdvipdfmx-image" +echo "*** dvipdfmx -v xbmc" && echo \ + && ./dvipdfmx -v $srcdir/tests/xbmc \ + && echo && echo "dvipdfmx-xbmc tests OK" && echo \ + || failed="$failed dvipdfmx-xbmc" + test -z "$failed" && exit 0 echo echo "failed tests:$failed" |