--- 縦書き用字形への変換テーブル
-local prepare_vert_data
-do
- local function add_feature_table(tname, src, dest)
- for i,v in pairs(src) do
- if type(v.slookups)=='table' then
- local s = v.slookups[tname]
- if s then
- dest = dest or {}
- dest[i] = dest[i] or {}
- dest[i].vert = dest[i].vert or s
- end
- end
- end
- return dest
- end
- prepare_vert_data = function (dest, id)
- local a = id.resources.sequences
- if a then
- local s = id.shared.rawdata.descriptions
- for i,v in pairs(a) do
- if v.features.vert or v.features.vrt2 then
- dest= add_feature_table(v.subtables[1], s, dest)
- end
- end
- end
- return dest
- end
- -- 縦書き用字形への変換
- function get_vert_glyph(n, chr)
- local fn = font_extra_info[n]
- return (fn and fn[chr] and fn[chr].vert) or chr
- end
-end
-
---