X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=src%2Fltj-pretreat.lua;h=1729c9e7f03f663c043d93fbdd30acc249fdb2af;hb=3fae82d64b193c794fdf2f1262d80bddc98ce5a8;hp=3186ca69389b60fc35dc3762a23e1d8ba93128fe;hpb=7f6bb9f51c5e837a865327c81d922130c3255d5a;p=luatex-ja%2Fluatexja.git diff --git a/src/ltj-pretreat.lua b/src/ltj-pretreat.lua index 3186ca6..1729c9e 100644 --- a/src/ltj-pretreat.lua +++ b/src/ltj-pretreat.lua @@ -103,7 +103,9 @@ do while pid==id_glyph do local pc = getchar(p) if has_attr(p, attr_icflag, 0) and is_ucs_in_japanese_char(p, pc) then - setfont(p, ltjf_replace_altfont(has_attr(p, attr_curjfnt) or getfont(p), pc)) + local pf = has_attr(p, attr_curjfnt) + pf = (pf and pf>0 and pf) or getfont(p) + setfont(p, ltjf_replace_altfont(pf, pc)) setlang(p, lang_ja) ltjs_orig_char_table[p] = pc end @@ -149,7 +151,7 @@ local function set_box_stack_level(head, mode) if ltjf_font_metric_table[nf].vert_activated then local pc = getchar(p) pc = ltjf_font_metric_table[nf].vform[pc] - if pc then print('Replace ', getchar(p) , pc); setchar(p, pc) end + if pc then setchar(p, pc) end end end end