- local function main_process(head, mode, dir)
- local p = to_direct(head)
- p = ltjj.main(p,mode)
- if p then p = ltjw.set_ja_width(p, dir) end
- return to_node(p)
+ local function main_process(head, mode, dir, gc)
+ tex.setattribute('global', attr_icflag, 0)
+ if gc == 'fin_row' then return head
+ else
+ local p = to_direct(head)
+ start_time_measure('jfmglue')
+ p = ltjj.main(p,mode)
+ stop_time_measure('jfmglue'); start_time_measure('setwidth')
+ if p then p = ltjw.set_ja_width(p, dir) end
+ stop_time_measure('setwidth')
+ return to_node(p)
+ end
+ end
+
+ local function adjust_icflag(h)
+ -- kern from luaotfload will have icflag = 1
+ -- (same as italic correction)
+ tex.setattribute('global', attr_icflag, 1)
+ return h