- if p.id==id_whatsit then
- if p.subtype==sid_user and p.user_id==OTF then
- local g = node_new(id_glyph)
- g.subtype = 0; g.char = p.value
- v = has_attr(p, attr_curjfnt); g.font = v
- set_attr(g, attr_curjfnt, v)
- v = has_attr(p, attr_yablshift)
- if v then
- set_attr(g, attr_yablshift, v)
- else
- unset_attr(g, attr_yablshift)
- end
- head = node_insert_after(head, p, g)
- head = node_remove(head, p)
- node_free(p); p = g
- end
+ if getid(p)==id_whatsit then
+ if getsubtype(p)==sid_user then
+ local puid = getfield(p, 'user_id')
+ if puid==OTF then
+ --if puid==OTF or puid==VSR then
+ local g = node_new(id_glyph)
+ setfield(g, 'subtype', 0)
+ setfield(g, 'char', getfield(p, 'value'))
+ local v = has_attr(p, attr_curfnt); setfield(g, 'font',v)
+ --if puid==OTF then
+ setfield(g, 'lang', lang_ja)
+ set_attr(g, attr_kblshift, has_attr(p, attr_kblshift))
+ --else
+ -- set_attr(g, attr_ablshift, has_attr(p, attr_ablshift))
+ --end
+ head = node_insert_after(head, p, g)
+ head = node_remove(head, p)
+ node_free(p); p = g
+ end
+ end