- if t.specification and t.resources then
- local add_vert = not ltju.exist_feature(fnum, 'vert') and not ltju.exist_feature(fnum, 'vrt2')
- local jpotf_vert = ltju.specified_feature(fnum, 'jpotf')
- -- 現在の language, script で vert もvrt2 も有効にできない場合,強制的に vert 適用
- for _,i in pairs(t.resources.sequences) do
- if i.order[1]== 'vert' and i.type == 'gsub_single' and i.steps then
- for _,j in pairs(i.steps) do
- if type(j)=='table' then
- add_vform(j.coverage,vform, t, add_vert, jpotf_vert)
- end
- end
- end
- end
+ if not t then return fmtable end
+ for i,v in pairs(vert_form_table) do
+ if t.characters[v] then vform[i] = v end
+ end
+ if ltju.specified_feature(fnum, 'jpotf') then
+ for i,v in pairs(vert_jpotf_table) do
+ if t.characters[v] then vform[i] = vform[v] or v end
+ end
+ end
+ if not ltju.exist_feature(fnum, 'vert') and not ltju.exist_feature(fnum, 'vrt2') then
+ -- 現在の (script, lang) で vert もvrt2 も有効にできない場合,
+ -- 全 (script,lang) の vert を強制的に適用
+ ltju.loop_over_feat(t, vert_feat, function (i,k) vform[i] = vform[i] or k end, true)