summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2016-04-17 21:41:09 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2016-04-17 21:41:09 +0200
commitec774e0e4d16ed440e6b892a7325b304aec82e71 (patch)
tree196cd35918495cfa27fba2e53aeed4ee35cb4614
parent718bfce1622980a60ce51c2c5b739ff975918dd5 (diff)
downloadluaotfload-ec774e0e4d16ed440e6b892a7325b304aec82e71.tar.gz
[features] adjust feature processor to new data structures
-rw-r--r--src/luaotfload-features.lua14
1 files 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