OSDN Git Service

commit 9f0183d removed a necessary callback
[luatex-ja/luatexja.git] / src / ltj-jfmglue.lua
index 680c6aa..066568c 100644 (file)
@@ -9,6 +9,7 @@ luatexbase.provides_module({
 module('luatexja.jfmglue', package.seeall)
 local err, warn, info, log = luatexbase .errwarinf(_NAME)
 
+luatexja.load_module('base');      local ltjb = luatexja.base
 luatexja.load_module('stack');     local ltjs = luatexja.stack
 luatexja.load_module('jfont');     local ltjf = luatexja.jfont
 luatexja.load_module('direction'); local ltjd = luatexja.direction
@@ -106,11 +107,21 @@ local function fast_find_char_class(c,m)
 end
 
 -- 文字クラスの決定
-local function slow_find_char_class(c, m, oc)
-   local xc = c or oc
-   local cls = ltjf_find_char_class(oc, m)
-   if xc ~= oc and  cls==0 then cls = ltjf_find_char_class(-xc, m) end
-   return cls, xc
+local slow_find_char_class
+do
+   local start_time_measure = ltjb.start_time_measure
+   local stop_time_measure = ltjb.stop_time_measure
+   slow_find_char_class = function (c, m, oc)
+      start_time_measure('slow_find_chr')
+      local cls = ltjf_find_char_class(oc, m)
+      if not c and  cls==0 then 
+        stop_time_measure('slow_find_chr')
+        return ltjf_find_char_class(-c, m), oc
+      else
+        stop_time_measure('slow_find_chr')
+        return cls, oc
+      end
+   end
 end
 
 local zero_glue = node_new(id_glue)
@@ -310,6 +321,7 @@ local calc_np_auxtable = {
    [id_hlist] = function(lp)
       local op, flag
       head, lp, op, flag = ltjd_make_dir_node(head, lp, list_dir, 'jfm hlist')
+      set_attr(op, attr_icflag, PROCESSED)
       Np.first = Np.first or op; Np.last = op; Np.nuc = op;
       Np.id = (flag or getfield(op, 'shift')~=0) and id_box_like or id_hlist
       return true, lp