OSDN Git Service

ltjsclasses: sync with jsclasses 2020-10-09
[luatex-ja/luatexja.git] / doc / jfm-testf.lua
1 local t = luatexja.jfont.jfm_feature
2 myjfm = t
3 local k = (type(t and t.kern)=='string') and tonumber(t.kern) or 0.0
4 local d = (type(t and t.down)=='string') and tonumber(t.down) or 0.0
5 local t2= {
6    dir = 'yoko',
7    zw = 1.0, zh = 1.0,
8    [0] = {
9       align = 'left', left = 0.0, down = 0.0,
10       width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
11       kern = { [1] = k }
12    },
13    [1] = {
14       chars = { '漢', '字', },
15       align = 'left', left = 0.0, down = d,
16       width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
17       kern = { [0] = 0.5, [2] = 0.5, [1000] = 0.5 }
18    },
19    [2] = {
20       chars = { 'イ' },
21       align = 'left', left = 0.0, down = 0.0,
22       width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
23       kern = { [1] = k }
24    },
25    [1000] = {
26       chars = { 'boxbdd' },
27    },
28 }
29 if t and t.hira then
30     for i=0x3040,0x309F do 
31         table.insert(t2[1].chars, i)
32     end
33 end
34 luatexja.jfont.define_jfm   (t2)