X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=src%2Fltj-ruby.lua;h=1237cea46287c6277f6929177658f0a4b004a3f6;hb=0f0921ced2b53537326ad20ce546020b3cae2670;hp=bf57c77208c16f2ca316a6e6ed0d1952db09d36e;hpb=0e8b59d4e986bb2c1e1af9746d649389325db9a1;p=luatex-ja%2Fluatexja.git diff --git a/src/ltj-ruby.lua b/src/ltj-ruby.lua index bf57c77..1237cea 100644 --- a/src/ltj-ruby.lua +++ b/src/ltj-ruby.lua @@ -3,7 +3,7 @@ -- luatexbase.provides_module({ name = 'luatexja.ruby', - date = '2015/09/18', + date = '2017/05/05', description = 'Ruby annotation', }) module('luatexja.ruby', package.seeall) @@ -205,7 +205,7 @@ do local hic = has_attr(hx, attr_icflag) if (hic == KANJI_SKIP) or (hic == KANJI_SKIP_JFM) or (hic == XKANJI_SKIP) or (hic == XKANJI_SKIP_JFM) - or ((hic<=FROM_JFM+2) and (hic>=FROM_JFM-2)) then + or ((hic<=FROM_JFM+63) and (hic>=FROM_JFM)) then -- この 5 種類の空白をのばす if getid(hx) == id_kern then local k = node_new(id_glue) @@ -215,7 +215,7 @@ do h = insert_after(h, hx, k); h = node_remove(h, hx); node_free(hx); hx = k else -- glue - setglue(hx, getfield(hx, 'width'), round(middle*65536), 0, + setglue(hx, getfield(hx, 'width'), round(middle*65536), 0, 2, 0) end end @@ -374,7 +374,7 @@ local function new_ruby_box(r, p, ppre, pmid, ppost, setfield(rt, 'head', nil); node_free(rt); end end - local a, k = node_new(id_rule), node_new(id_kern) + local a, k = node_new(id_rule), node_new(id_kern, 1) setfield(a, 'width', 0); setfield(a, 'height', 0) setfield(a, 'depth', 0); setfield(k, 'kern', rgap) insert_after(r, r, a); insert_after(r, a, k); @@ -382,7 +382,7 @@ local function new_ruby_box(r, p, ppre, pmid, ppost, a = node.direct.vpack(r); setfield(a, 'shift', 0) set_attr(a, attr_ruby, post_intrusion) if rsmash or getfield(a, 'height')