summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua22
1 files changed, 14 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
index a63c270e676..9a638e38928 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
@@ -3,7 +3,7 @@
--
luatexbase.provides_module({
name = 'luatexja.jfmglue',
- date = '2015/05/03',
+ date = '2016/03/31',
description = 'Insertion process of JFM glues and kanjiskip',
})
module('luatexja.jfmglue', package.seeall)
@@ -283,8 +283,8 @@ do
local traverse = Dnode.traverse
local function check_next_ickern(lp)
- if lp and getid(lp) == id_kern and ITALIC == get_attr_icflag(lp) then
- set_attr(lp, attr_icflag, IC_PROCESSED)
+ if lp and getid(lp) == id_kern and ( getsubtype(lp)==3 or ITALIC == get_attr_icflag(lp)) then
+ set_attr(lp, attr_icflag, IC_PROCESSED);
Np.last = lp; return node_next(lp)
else
Np.last = Np.nuc; return lp
@@ -318,6 +318,7 @@ end
local ltjw_apply_ashift_math = ltjw.apply_ashift_math
local ltjw_apply_ashift_disc = ltjw.apply_ashift_disc
local min, max = math.min, math.max
+local rule_subtype = (status.luatex_version>=85) and 3 or 0
local function calc_np_aux_glyph_common(lp)
Np.nuc = lp
Np.first= (Np.first or lp)
@@ -366,7 +367,7 @@ local function calc_np_aux_glyph_common(lp)
lx = node_next(node_next(lx))
elseif ls==0 then
Np.last = lx
- elseif (ls==1 and lai==ITALIC) then
+ elseif (ls==3) or (lai==ITALIC) then
Np.last = lx; set_attr(lx, attr_icflag, IC_PROCESSED)
else
lp=lx; break
@@ -378,7 +379,7 @@ local function calc_np_aux_glyph_common(lp)
end
local r
if adj_depth>node_depth then
- r = node_new(id_rule)
+ r = node_new(id_rule,rule_subtype)
setfield(r, 'width', 0); setfield(r, 'height', 0)
setfield(r, 'depth',adj_depth); setfield(r, 'dir', tex_dir)
set_attr(r, attr_icflag, PROCESSED)
@@ -519,7 +520,11 @@ local calc_np_auxtable = {
end,
}
calc_np_auxtable[id_rule] = calc_np_auxtable.box_like
-calc_np_auxtable[13] = calc_np_auxtable.box_like
+if status.luatex_version>=85 then
+ calc_np_auxtable[15] = calc_np_auxtable.box_like
+else
+ calc_np_auxtable[13] = calc_np_auxtable.box_like
+end
calc_np_auxtable[id_ins] = calc_np_auxtable.skip
calc_np_auxtable[id_mark] = calc_np_auxtable.skip
calc_np_auxtable[id_adjust] = calc_np_auxtable.skip
@@ -541,7 +546,7 @@ function calc_np(last, lp)
for k = 1,#Bp do Bp[k] = nil end
while lp ~= last do
local lpa = has_attr(lp, attr_icflag) or 0
- -- unbox 由来ノードの検出
+ -- unbox 由来ノードの検出
if lpa>=PACKED then
if lpa%PROCESSED_BEGIN_FLAG == BOXBDD then
local lq = node_next(lp)
@@ -1196,7 +1201,8 @@ function main(ahead, mode, dir)
lp = calc_np(last, lp)
if Np then
handle_list_head(par_indented)
- lp = calc_np(last,lp); while Np do
+ lp = calc_np(last,lp);
+ while Np do
adjust_nq();
local pid, pm = Np.id, Np.met
-- 挿入部