---
-local function cid_cache_load(fullpath)
- cidfont_data[cid_name] = require(fullpath)
- cache_chars[cid_name] = { [655360] = cidfont_data[cid_name].characters }
+--
+local cidf_vert_processor
+do
+ local traverse_id, is_node = node.direct.traverse_id, node.is_node
+ local to_direct = node.direct.todirect
+ local id_glyph = node.id('glyph')
+ local getfont = node.direct.getfont
+ local getchar = node.direct.getchar
+ local setchar = node.direct.setchar
+ cidf_vert_processor = {
+ function (head, fnum)
+ local fontdata = identifiers[fnum]
+ if head and luatexja.jfont.font_metric_table[fnum].vert_activated then
+ local vt = fontdata.shared.ltj_vert_table
+ local nh = is_node(head) and to_direct(head) or head
+ for n in traverse_id(id_glyph, head) do
+ if getfont(n)==fnum then
+ local c = getchar(n); setchar(n, vt[c] or c)
+ end
+ end
+ return head, false
+ end
+ end
+ }