OSDN Git Service

small fix
[luatex-ja/luatexja.git] / src / ltj-jfmglue.lua
index 574302a..5510305 100644 (file)
@@ -1,9 +1,9 @@
 --
--- luatexja/ltj-jfmglue.lua
+-- ltj-jfmglue.lua
 --
 luatexbase.provides_module({
   name = 'luatexja.jfmglue',
-  date = '2019/07/26',
+  date = '2019/09/26',
   description = 'Insertion process of JFM glues, [x]kanjiskip and others',
 })
 luatexja.jfmglue = luatexja.jfmglue or {}
@@ -12,7 +12,8 @@ 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
-luatexja.load_module('setwidth');      local ltjw = luatexja.setwidth
+luatexja.load_module('setwidth');  local ltjw = luatexja.setwidth
+luatexja.load_module('lotf_aux');  local ltju = luatexja.lotf_aux
 local pairs = pairs
 
 --local to_node = node.direct.tonode
@@ -191,8 +192,7 @@ local function check_box(box_ptr, box_end)
       end
       if pid==id_kern then
         local pa = get_attr_icflag(p)
-        if (pa==IC_PROCESSED)or(pa==BOXBDD) then
-        --if (pa==IC_PROCESSED)or(pa==BOXBDD)or(getsubtype(p)==0) then
+        if pa==IC_PROCESSED then
            -- do nothing
         elseif getsubtype(p)==2 then
            p = node_next(node_next(p));
@@ -222,8 +222,7 @@ local function check_box(box_ptr, box_end)
            first_char = p; find_first_char = false
         end
         last_char = p; found_visible_node = true
-      elseif (pid==id_rule and get_attr_icflag(p)==PACKED)
-         or (pid==id_glue and get_attr_icflag(p)==BOXBDD) then
+      elseif pid==id_rule and get_attr_icflag(p)==PACKED then
         -- do nothing
       elseif not (pid==id_ins   or pid==id_mark
                  or pid==id_adjust or pid==id_whatsit
@@ -314,13 +313,11 @@ do -- 002 ---------------------------------------
    local getwhd = node.direct.getwhd
    local attr_jchar_class = luatexbase.attributes['ltj@charclass']
    local attr_jchar_code = luatexbase.attributes['ltj@charcode']
-   local identifiers = fonts.hashes.identifiers
+   local font_getfont = font.getfont
    local function calc_np_notdef(lp)
-      local ident = identifiers[getfont(lp)]
-      if not ident.descriptions[getchar(lp)] then
+      if not font_getfont(getfont(lp)).characters[getchar(lp)] then
         local ln = node_next(lp)
-        if (ident.shared and ident.shared.features and ident.shared.features.notdef)
-           and ln and getid(ln)==id_glyph then 
+        if ltju.specified_feature(getfont(lp), 'notdef') and ln and getid(ln)==id_glyph then 
            set_attr(lp, attr_icflag, PROCESSED)
            set_attr(ln, attr_jchar_code, has_attr(lp, attr_jchar_code) or getchar(lp))
            set_attr(ln, attr_jchar_class, has_attr(lp, attr_jchar_class) or 0)