diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua index c21de3ffdc5..42507758e02 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua @@ -124,6 +124,8 @@ end -- mode: true iff this function is called from hpack_filter local ltjs_report_stack_level = ltjs.report_stack_level +local ltjf_vert_form_table = ltjf.vert_form_table +local ltjf_font_metric_table = ltjf.font_metric_table local function set_box_stack_level(head, mode) local box_set, cl = 0, tex.currentgrouplevel + 1 for _,p in pairs(wt) do @@ -138,7 +140,12 @@ local function set_box_stack_level(head, mode) if (has_attr(p, attr_icflag) or 0)<=0 and getfield(p, 'lang')==lang_ja then local pfn = has_attr(p, attr_curtfnt) or getfont(p) local pc = ltjs_orig_char_table[p] - setfield(p, 'font', ltjf_replace_altfont(pfn, pc)) + local nf = ltjf_replace_altfont(pfn, pc) + setfield(p, 'font', nf) + if ltjf_font_metric_table[nf].vert_activated then + pc = ltjf_vert_form_table [getchar(p)] + if font.getfont(nf).characters[pc] then setfield(p, 'char', pc) end + end end end end |