- for p in Dnode.traverse_id(id_glyph,to_direct(head)) do
- 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]
- local nf = ltjf_replace_altfont(pfn, pc)
- setfield(p, 'font', nf)
- pc = ltjf_vert_form_table [getchar(p)]
- if font.getfont(nf).characters[pc] then setfield(p, 'char', pc) end
+ for p in node.direct.traverse_id(id_glyph,to_direct(head)) do
+ if has_attr(p, attr_icflag, 0) and getlang(p)==lang_ja then
+ local nf = ltjf_replace_altfont( has_attr(p, attr_curtfnt) or getfont(p) , ltjs_orig_char_table[p])
+ setfont(p, nf)
+ if ltjf_font_metric_table[nf].vert_activated then
+ local pc = getchar(p)
+ pc = ltjf_font_metric_table[nf].vform[pc]
+ if pc then setchar(p, pc) end
+ end