summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/luaotfload-features.lua14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/luaotfload-features.lua b/src/luaotfload-features.lua
index d212df5..fc04bce 100644
--- a/src/luaotfload-features.lua
+++ b/src/luaotfload-features.lua
@@ -1110,7 +1110,7 @@ local function ancient_addfeature (data, feature, specifications)
end
end
-local function current_addfeature(data,feature,specifications)
+local function addfeature(data,feature,specifications)
local descriptions = data.descriptions
local resources = data.resources
local features = resources.features
@@ -1158,18 +1158,17 @@ local function current_addfeature(data,feature,specifications)
end
local askedfeatures = specification.features or everywhere
local askedsteps = specifications.steps or specification.subtables or { specification.data } or { }
- local defaulttype = specification.type or "substitution"
+ local featuretype = normalized[specification.type or "substitution"] or "substitution"
local featureflags = specification.flags or noflags
local featureorder = specification.order or { feature }
local added = false
local nofsteps = 0
local steps = { }
for i=1,#askedsteps do
- local list = askedsteps[i]
- local coverage = { }
- local cover = coveractions[featuretype]
- local format = nil
- local featuretype = normalized[list.type or defaulttype] or "substitution"
+ local list = askedsteps[i]
+ local coverage = { }
+ local cover = coveractions[featuretype]
+ local format = nil
if not cover then
-- unknown
elseif featuretype == "substitution" then
@@ -1355,7 +1354,6 @@ local function current_addfeature(data,feature,specifications)
end
end
-
---[[ end snippet from font-otc.lua ]]
local tlig_order = { "tlig" }