OSDN Git Service

lltjext.sty: \strutbox -> \ystrutbox
[luatex-ja/luatexja.git] / src / ltj-jfont.lua
index 1c77e82..86d553a 100644 (file)
@@ -953,9 +953,9 @@ luatexbase.add_to_callback(
       local subtables = {}
       if ft.specification then
         for feat_name,v in pairs(ft.specification.features.normal) do
-           if v==true then
+           if v==true and ft.resources then
               for _,i in pairs(ft.resources.sequences) do
-                 if i.order[1]== feat_name and i.type == 'gpos_single' then
+                 if i.order[1]== feat_name and i.type == 'gpos_single' and type(i.subtables)=='table' then
                     for _,st in pairs(i.subtables) do
                        subtables[st] = true
                     end
@@ -985,8 +985,9 @@ do
   luatexbase.add_to_callback(
      'luaotfload.patch_font',
      function (tfmdata)
-       if tfmdata.cidinfo then
-          local rd = ltjr_prepare_cid_font(tfmdata.cidinfo.registry, tfmdata.cidinfo.ordering)
+       local cidinfo = tfmdata.cidinfo or tfmdata.resources.cidinfo
+       if cidinfo and cidinfo.registry and cidinfo.ordering then
+          local rd = ltjr_prepare_cid_font(cidinfo.registry, cidinfo.ordering)
           if rd then
              local ru, rc = rd.resources.unicodes, rd.characters
              for i,v in pairs(tfmdata.characters) do