end
luatexbase.add_to_callback('hpack_filter', extract,
- 'ltj.hpack_filter_otf',
+ 'ltj.otf',
luatexbase.priority_in_callback('pre_linebreak_filter',
- 'ltj.pre_linebreak_filter'))
+ 'ltj.main'))
luatexbase.add_to_callback('pre_linebreak_filter', extract,
- 'ltj.pre_linebreak_filter_otf',
+ 'ltj.otf',
luatexbase.priority_in_callback('pre_linebreak_filter',
- 'ltj.pre_linebreak_filter'))
-
+ 'ltj.main'))
-- additional callbacks
-- 以下は,LuaTeX-ja に用意された callback のサンプルになっている.
return p
end
- local function do_ivs_repr(head)
- head = to_direct(head)
+ local function do_ivs_repr(h)
+ local head = to_direct(h)
local p, r = head
- local is_dir_tate = ltjs.list_dir == dir_tate
+ local is_dir_tate = (ltjs.list_dir == dir_tate)
local attr_ablshift = is_dir_tate and attr_tablshift or attr_yablshift
local attr_kblshift = is_dir_tate and attr_tkblshift or attr_ykblshift
local attr_curfnt = is_dir_tate and attr_curtfnt or attr_curjfnt
if q and getid(q)==id_glyph then
local qc = getchar(q)
if (qc>=0xFE00 and qc<=0xFE0F) or (qc>=0xE0100 and qc<0xE01F0) then
- -- q is a variation selector
+ -- q is a variation selector
if qc>=0xE0100 then qc = qc - 0xE0100 end
local pt = ltjf_font_extra_info[pf]
pt = pt and pt[getchar(p)]; pt = pt and pt[qc]
head = node_insert_after(head, p, np)
head = node_remove(head,p)
node_free(p)
- end
+ end
p = r
else
p = q
else
p = node_next(p)
end
- end
- return to_node(head)
+ end
+ return to_node(head)
end
enable_ivs = function ()
'luatexja.otf.enable_ivs() was already called, so this call is ignored', '')
else
luatexbase.add_to_callback('hpack_filter',
- do_ivs_repr,'do_ivs',
+ do_ivs_repr, 'ltj.do_ivs',
luatexbase.priority_in_callback('hpack_filter',
- 'ltj.hpack_filter_pre')+1)
+ 'ltj.set_stack_level')+1)
luatexbase.add_to_callback('pre_linebreak_filter',
- do_ivs_repr, 'do_ivs',
+ do_ivs_repr, 'ltj.do_ivs',
luatexbase.priority_in_callback('pre_linebreak_filter',
- 'ltj.pre_linebreak_filter_pre')+1)
+ 'ltj.set_stack_level')+1)
is_ivs_enabled = true
end
end
local ltjs_report_stack_level = ltjs.report_stack_level
local ltjf_vert_form_table = ltjf.vert_form_table
local ltjf_font_metric_table = ltjf.font_metric_table
+local font_getfont = font.getfont
local function set_box_stack_level(head, mode)
local box_set, cl = 0, tex.currentgrouplevel + 1
for _,p in pairs(wt) do
setfield(p, 'font', nf)
if ltjf_font_metric_table[nf].vert_activated then
pc = ltjf_vert_form_table [getchar(p)]
- if font.getfont(nf).characters[pc] then setfield(p, 'char', pc) end
+ if font_getfont(nf).characters[pc] then setfield(p, 'char', pc) end
end
end
end
end
- --luatexja.ext_show_node_list(head, 'S> ', print)
return head
end
luatexbase.add_to_callback('hpack_filter',
function (head)
return set_box_stack_level(head, true)
- end,'ltj.hpack_filter_pre',1)
+ end,'ltj.set_stack_level',1)
luatexbase.add_to_callback('pre_linebreak_filter',
function (head)
return set_box_stack_level(head, false)
- end,'ltj.pre_linebreak_filter_pre',1)
+ end,'ltj.set_stack_level',1)
luatexja.pretreat = {
set_box_stack_level = set_box_stack_level,
% -----------------------------------------
%
% \fi
-% \CheckSum{5200}
+% \CheckSum{5202}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
'pre_linebreak_filter',
function (head,groupcode)
return main_process(head, true, tex.textdir, groupcode)
- end,'ltj.pre_linebreak_filter',
+ end,'ltj.main',
luatexbase.priority_in_callback('pre_linebreak_filter',
- 'luaotfload.node_processor') + 1)
+ 'luaotfload.node_processor')+1)
luatexbase.add_to_callback(
'hpack_filter',
function (head,groupcode,size,packtype, dir)
return main_process(head, false, dir, groupcode)
- end,'ltj.hpack_filter',
+ end,'ltj.main',
luatexbase.priority_in_callback('hpack_filter',
'luaotfload.node_processor') + 1)
luatexbase.add_to_callback('pre_linebreak_filter', adjust_icflag, 'ltj.adjust_icflag', 1)