- local non_math = true
- for p in node.traverse(head) do
- if p.id == id_glyph and non_math then
- local i = has_attr(p, attr_icflag) or 0
- if i==0 and ltjc.is_ucs_in_japanese_char(p) then
- local v = has_attr(p, attr_curjfnt)
- if v then
- p.font = v
- end
- v = has_attr(p, attr_ykblshift)
- if v then
- set_attr(p, attr_yablshift, v)
- else
- unset_attr(p, attr_yablshift)
- end
- if p.subtype%2==1 then p.subtype = p.subtype - 1 end
- -- p.lang=lang_ja
+ local non_math, p = true, head
+ wt = {}
+ while p do
+ if p.id == id_glyph then
+ if (has_attr(p, attr_icflag) or 0)<=0 and ltjc_is_ucs_in_japanese_char(p) then
+ p.font = has_attr(p, attr_curjfnt) or p.font
+ p.subtype = floor(p.subtype*0.5)*2
+ set_attr(p, attr_orig_char, p.char)