X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=src%2Fltj-jfmglue.lua;h=0659fd01dd26868f9ecc4eb236e545306da81705;hb=2e9566b50d653da63edab02f263bcbf96df78d0e;hp=041426e4096ebce3f0643437226309af99c29aba;hpb=83b806e4038c2c104e8d7c072ddf095326005f98;p=luatex-ja%2Fluatexja.git diff --git a/src/ltj-jfmglue.lua b/src/ltj-jfmglue.lua index 041426e..0659fd0 100644 --- a/src/ltj-jfmglue.lua +++ b/src/ltj-jfmglue.lua @@ -183,12 +183,8 @@ local function check_box(box_ptr, box_end) end while p and p~=box_end do local pid = p.id - if pid==id_kern then - if p.subtype==2 then - p = node_next(node_next(node_next(p))); pid = p.id - elseif has_attr(p, attr_icflag)==IC_PROCESSED then - p = node_next(p); pid = p.id - end + if pid==id_kern and p.subtype==2 then + p = node_next(node_next(node_next(p))); pid = p.id -- p must be glyph_node end if pid==id_glyph then repeat @@ -198,9 +194,11 @@ local function check_box(box_ptr, box_end) last_char = p; found_visible_node = true; p=node_next(p) if (not p) or p==box_end then return found_visible_node end until p.id~=id_glyph - pid = p.id + pid = p.id -- p must be non-nil end - if pid==id_hlist then + if pid==id_kern and has_attr(p, attr_icflag)==IC_PROCESSED then + p = node_next(p); + elseif pid==id_hlist then if has_attr(p, attr_icflag)==PACKED then for q in node.traverse_id(id_glyph, p.head) do if find_first_char then @@ -1000,8 +998,8 @@ function create_beginpar_node() end local function whatsit_callback(Np, lp, Nq, bsl) - if Np.nuc then return Np - elseif lp.user_id == 30114 then + if Np and Np.nuc then return Np + elseif Np and lp.user_id == 30114 then Np.first = lp; Np.nuc = lp; Np.last = lp Np.char = 'parbdd' Np.met = nil