OSDN Git Service

ltj-jfont: more check
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Wed, 28 Sep 2016 19:40:42 +0000 (04:40 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Wed, 28 Sep 2016 19:40:42 +0000 (04:40 +0900)
src/ltj-jfont.lua

index 1c77e82..84a6ead 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