2 -- 和文文字と満たす unicode の範囲(適当)
3 function ltj.is_ucs_in_japanese_char(c)
4 if (c>=0x2000)and(c<=0x27FF) then return true
5 elseif (c>=0x2900)and(c<=0x29FF) then return true
6 elseif (c>=0x3000)and(c<=0x30FF) then return true
7 elseif (c>=0x31F0)and(c<=0x4DBF) then return true
8 elseif (c>=0x4E00)and(c<=0x9FFF) then return true
9 elseif (c>=0xF900)and(c<=0xFAFF) then return true
10 elseif (c>=0xFF00)and(c<=0xFFEF) then return true
11 elseif (c>=0x20000)and(c<=0xDFFFF) then return true
17 -- gb: 前側の和文文字 b 由来の glue/kern (maybe nil)
18 -- ga: 後側の和文文字 a 由来の glue/kern (maybe nil)
19 -- 両者から,b と a の間に入る glue/kern を計算する
21 function ltj.calc_between_two_jchar_aux(gb,ga)
25 if not ga then return gb end
26 local k = node.type(gb.id) .. node.type(ga.id)
27 if k == 'glueglue' then
29 gb.spec.width = tex.round((gb.spec.width+ga.spec.width)/2)
30 gb.spec.stretch = tex.round((gb.spec.stretch+ga.spec.shrink)/2)
31 gb.spec.shrink = tex.round((gb.spec.shrink+ga.spec.shrink)/2)
32 elseif k == 'kernkern' then
34 gb.kern = tex.round((gb.kern+ga.kern)/2)
35 elseif k == 'kernglue' then