------------------------------------------------------------------------
local is_ucs_in_japanese_char = ltjc.is_ucs_in_japanese_char_direct
+local font = font
-- EXT: italic correction
function append_italic()
local p = to_direct(tex.nest[tex.nest.ptr].tail)
local j = font_metric_table[f]
setfield(g, 'kern', j.char_type[find_char_class(getchar(p), j)].italic)
else
- local h = font_getfont(f)
+ local h = font_getfont(f) or font.fonts[f]
if h then
setfield(g, 'kern', h.characters[getchar(p)].italic)
else
local ltjf_replace_altfont = ltjf.replace_altfont
local attr_orig_char = luatexbase.attributes['ltj@origchar']
local STCK = luatexja.userid_table.STCK
+local lang_ja = token.create('ltj@japanese')[2]
------------------------------------------------------------------------
-- MAIN PROCESS STEP 1: replace fonts
local pc = getchar(p)
local pf = ltjf_replace_altfont(has_attr(p, attr_curjfnt) or getfont(p), pc)
setfield(p, 'font', pf); set_attr(p, attr_curjfnt, pf)
- setfield(p, 'subtype', floor(getsubtype(p)*0.5)*2)
+ setfield(p, 'lang', lang_ja)
+ -- setfield(p, 'subtype', floor(getsubtype(p)*0.5)*2)
set_attr(p, attr_orig_char, pc)
end
return p
wt, head = {}, p
while p do
local pfunc = suppress_hyphenate_ja_aux[getid(p)]
- if pfunc then p = pfunc(p) end
- p = node_next(p)
+ p = node_next(pfunc and pfunc(p) or p)
end
head = to_node(head)
lang.hyphenate(head)
\newluatexattribute\ltj@yablshift % attribute for \yabaselineshift
\newluatexattribute\ltj@ykblshift % attribute for \ykbaselineshift
\newluatexattribute\jfam % index for current jfam
+\newlanguage\ltj@@japanese
\ltj@icflag=0
\ltj@origchar=0
\ltj@charclass=0