From ec774e0e4d16ed440e6b892a7325b304aec82e71 Mon Sep 17 00:00:00 2001
From: Philipp Gesang <phg@phi-gamma.net>
Date: Sun, 17 Apr 2016 21:41:09 +0200
Subject: [features] adjust feature processor to new data structures

---
 src/luaotfload-features.lua | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/luaotfload-features.lua b/src/luaotfload-features.lua
index 2148019..16422db 100644
--- a/src/luaotfload-features.lua
+++ b/src/luaotfload-features.lua
@@ -1853,12 +1853,18 @@ otf.addfeature           = add_otf_feature
 
 local install_extra_features = function (data, filename, raw)
     for feature, specification in next, extrafeatures do
+        local fontname
+        local subfont
+        local metadata = data.metadata
+        if metadata then
+            fontname = tostring (data.metadata.fontname)
+            subfont  = tonumber (metadata.subfontindex)
+        end
+        if not fontname then fontname = "<unknown>" end
+        if not subfont  then subfont  = -1          end
         logreport ("both", 3, "features",
                    "register synthetic feature ā€œ%sā€ for %s font ā€œ%sā€(%d)",
-                   feature,
-                   data.format,
-                   tostring (data.metadata and data.metadata.fontname or "<unknown>"),
-                   data.subfont or -1)
+                   feature, data.format, fontname, subfont)
         otf.features.register { name = feature, description = specification[2] }
         otf.enhancers.addfeature (data, feature, specification[1])
     end
-- 
cgit v1.2.3