diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2021-02-12 02:22:56 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2021-02-12 02:22:56 +0000 |
commit | f90c3545af4782ea5844735a3c8c30338b395521 (patch) | |
tree | 730234e9fca812fd16e801ef80bb24718cc2df67 /Build/source/texk/dvipdfm-x/dvi.c | |
parent | 3b543a9d9fbcd3c542f0c0fdeed9afc71ed0bb7f (diff) |
Fix a bug that current_font is not checked properly when calculating
"phantom" box. (S. Hirata)
git-svn-id: svn://tug.org/texlive/trunk@57720 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/dvi.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/dvi.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Build/source/texk/dvipdfm-x/dvi.c b/Build/source/texk/dvipdfm-x/dvi.c index 9033d2c2659..473c52e8c3c 100644 --- a/Build/source/texk/dvipdfm-x/dvi.c +++ b/Build/source/texk/dvipdfm-x/dvi.c @@ -1380,7 +1380,14 @@ void dvi_right (int32_t x) pdf_rect rect; spt_t width, height, depth; if (catch_phantom == 1) { - height = loaded_fonts[current_font].size; + if (current_font >= 0 && current_font < num_loaded_fonts) { + height = loaded_fonts[current_font].size; + } else { + if (dpx_conf.verbose_level > 0) { + WARN("Don't know how to calculate the box height since current font is not set..."); + } + height = 0.0; + } depth = 0.0; } else { height = phantom_height / dvi2pts; |