glue = {
-- [index] = { width, stretch, shrink, [priority, [ratio]],
-- ksp_nat=t/f, ksp_stretch=t/f, ksp_shrink=t/f }
- [1] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=true },
- [2] = { 0, 0, 0, ksp_shrink=true },
+ [1] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=1 },
+ [2] = { 0, 0, 0, ksp_shrink=1 },
[3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
- [4] = { 0, 0, 0, ksp_shrink=true },
- [6] = { 0, 0, 0, ksp_shrink=true },
- [7] = { 0, 0, 0, ksp_shrink=true },
- [8] = { 0, 0, 0, ksp_shrink=true },
+ [4] = { 0, 0, 0, ksp_shrink=1 },
+ [6] = { 0, 0, 0, ksp_shrink=1 },
+ [7] = { 0, 0, 0, ksp_shrink=1 },
+ [8] = { 0, 0, 0, ksp_shrink=1 },
}
},
width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
glue = {
-- 3 のみ四分,あとは0
- [0] = { 0, 0, 0, ksp_shrink=true },
- [1] = { 0, 0, 0, ksp_shrink=true },
- [2] = { 0, 0, 0, ksp_shrink=true },
+ [0] = { 0, 0, 0, ksp_shrink=1 },
+ [1] = { 0, 0, 0, ksp_shrink=1 },
+ [2] = { 0, 0, 0, ksp_shrink=1 },
[3] = { 0.25, 0.0, 0.25, priority=1 },
- [4] = { 0, 0, 0, ksp_shrink=true },
- [5] = { 0, 0, 0, ksp_shrink=true },
- [6] = { 0, 0, 0, ksp_shrink=true },
- [7] = { 0, 0, 0, ksp_shrink=true },
- [8] = { 0, 0, 0, ksp_shrink=true },
+ [4] = { 0, 0, 0, ksp_shrink=1 },
+ [5] = { 0, 0, 0, ksp_shrink=1 },
+ [6] = { 0, 0, 0, ksp_shrink=1 },
+ [7] = { 0, 0, 0, ksp_shrink=1 },
+ [8] = { 0, 0, 0, ksp_shrink=1 },
}
},
width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
glue = {
-- 3 は四分, 2, 4, 9 は0, あとは0.5
- [0] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=true },
- [1] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=true },
- [2] = { 0, 0, 0, ksp_shrink=true},
+ [0] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 },
+ [1] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 },
+ [2] = { 0, 0, 0, ksp_shrink=1},
[3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
- [4] = { 0, 0, 0, ksp_shrink=true },
- [5] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=true },
- [6] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=true },
- [7] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=true },
- [8] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=true },
+ [4] = { 0, 0, 0, ksp_shrink=1 },
+ [5] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 },
+ [6] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 },
+ [7] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 },
+ [8] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 },
}
},
width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
glue = {
-- 3 は.75, 2, 4 は0, あとは0.5
- [0] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=true },
- [1] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=true },
- [3] = { 0.75, 0.0, 0.25, priority=1, ratio=1/3, ksp_stretch=true },
- [5] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=true },
- [6] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=true },
- [7] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=true },
- [8] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=true },
+ [0] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 },
+ [1] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 },
+ [3] = { 0.75, 0.0, 0.25, priority=1, ratio=1./3, ksp_stretch=1 },
+ [5] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 },
+ [6] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 },
+ [7] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 },
+ [8] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 },
}
},
align = 'left', left = 0.0, down = 0.0,
width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
glue = {
- [1] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=true },
- [2] = { 0, 0, 0, ksp_shrink=true },
+ [1] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=1 },
+ [2] = { 0, 0, 0, ksp_shrink=1 },
[3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
- [4] = { 0, 0, 0, ksp_shrink=true },
- [6] = { 0, 0, 0, ksp_shrink=true },
+ [4] = { 0, 0, 0, ksp_shrink=1 },
+ [6] = { 0, 0, 0, ksp_shrink=1 },
},
kern = {
[5] = 0.0
align = 'left', left = 0.0, down = 0.0,
width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
glue = {
- [0] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=true },
- [1] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=true },
- [2] = { 0, 0, 0, ksp_shrink=true },
+ [0] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=1 },
+ [1] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=1 },
+ [2] = { 0, 0, 0, ksp_shrink=1 },
[3] = { 0.75, 0.0, 0.25, priority=1, ratio=1 },
- [4] = { 0, 0, 0, ksp_shrink=true },
- [6] = { 0, 0, 0, ksp_shrink=true },
- [7] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=true },
- [8] = { 0, 0, 0, ksp_shrink=true },
+ [4] = { 0, 0, 0, ksp_shrink=1 },
+ [6] = { 0, 0, 0, ksp_shrink=1 },
+ [7] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=1 },
+ [8] = { 0, 0, 0, ksp_shrink=1 },
},
kern = {
[5] = 0.0
align = 'left', left = 0.0, down = 0.0,
width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
glue = {
- [1] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=true },
- [2] = { 0, 0, 0, ksp_shrink=true },
+ [1] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=1 },
+ [2] = { 0, 0, 0, ksp_shrink=1 },
[3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
- [4] = { 0, 0, 0, ksp_shrink=true },
- [6] = { 0, 0, 0, ksp_shrink=true},
- [7] = { 0, 0, 0, ksp_shrink=true },
- [8] = { 0, 0, 0, ksp_shrink=true},
+ [4] = { 0, 0, 0, ksp_shrink=1 },
+ [6] = { 0, 0, 0, ksp_shrink=1},
+ [7] = { 0, 0, 0, ksp_shrink=1 },
+ [8] = { 0, 0, 0, ksp_shrink=1},
}
},
align = 'left', left = 0.0, down = 0.0,
width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
glue = {
- [1] = { 0.5 , 0.0, 0.5, 0, 1, ksp_stretch=true },
- [2] = { 0, 0, 0, ksp_shrink=true },
+ [1] = { 0.5 , 0.0, 0.5, 0, 1, ksp_stretch=1 },
+ [2] = { 0, 0, 0, ksp_shrink=1 },
[3] = { 0.25, 0.0, 0.25, 1, 1 },
- [4] = { 0, 0, 0, ksp_shrink=true },
- [6] = { 0, 0, 0, ksp_shrink=true },
+ [4] = { 0, 0, 0, ksp_shrink=1 },
+ [6] = { 0, 0, 0, ksp_shrink=1 },
},
kern = {
[8] = 0.0
local gx = node_new(id_glue_spec);
setfield(gx, 'stretch_order', 0); setfield(gx, 'shrink_order', 0)
local bk = qm.kanjiskip or null_skip_table
- setfield(gx, 'width', bn and bk[1] or 0)
- setfield(gx, 'stretch', bp and bk[2] or 0)
- setfield(gx, 'shrink', bh and bk[3] or 0)
+ setfield(gx, 'width', bn and (bn*bk[1]) or 0)
+ setfield(gx, 'stretch', bp and (bp*bk[2]) or 0)
+ setfield(gx, 'shrink', bh and (bh*bk[3]) or 0)
setfield(g, 'spec', gx)
set_attr(g, attr_icflag, KANJI_SKIP_JFM)
return g
local gx = node_new(id_glue_spec);
setfield(gx, 'stretch_order', 0); setfield(gx, 'shrink_order', 0)
local ks = getfield(kanji_skip, 'spec')
- setfield(gx, 'width', bn and getfield(ks, 'width') or 0)
- setfield(gx, 'stretch', bp and getfield(ks, 'stretch') or 0)
- setfield(gx, 'shrink', bh and getfield(ks, 'shrink') or 0)
+ setfield(gx, 'width', bn and (bn*getfield(ks, 'width')) or 0)
+ setfield(gx, 'stretch', bp and (bp*getfield(ks, 'stretch')) or 0)
+ setfield(gx, 'shrink', bh and (bh*getfield(ks, 'shrink')) or 0)
setfield(g, 'spec', gx)
set_attr(g, attr_icflag, KANJI_SKIP_JFM)
return g
if Np.auto_kspc or Nq.auto_kspc then
local pm, qm = Np.met, Nq.met
if (pm.char_type==qm.char_type) and (qm.var==pm.var) then
- return get_kanjiskip_low(true, qm, true, true, true)
+ return get_kanjiskip_low(true, qm, 1, 1, 1)
else
- local gb = get_kanjiskip_low(true, qm, true, true, true)
- local ga = get_kanjiskip_low(true, pm, true, true, true)
+ local gb = get_kanjiskip_low(true, qm, 1, 1, 1)
+ local ga = get_kanjiskip_low(true, pm, 1, 1, 1)
return calc_ja_ja_aux(gb, ga, 0, 1)
end
else
get_xkanjiskip = function(Nn)
if (Nq.xspc>=2) and (Np.xspc%2==1) and (Nq.auto_xspc or Np.auto_xspc) then
- return get_xkanjiskip_low(true, Nn.met, true, true, true)
+ return get_xkanjiskip_low(true, Nn.met, 1, 1, 1)
else
local g = node_copy(zero_glue)
set_attr(g, attr_icflag, xkanjiskip_jfm_flag and XKANJI_SKIP_JFM or XKANJI_SKIP)