summaryrefslogtreecommitdiff
path: root/src/luaotfload-features.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2015-12-21 21:17:36 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2015-12-21 21:17:36 +0100
commit68eaaa92a2235f4b56f45168e987146171cb1518 (patch)
tree4c23fd9da9f327773188db62ae44909228db5e3e /src/luaotfload-features.lua
parentfde58ab447fbfdbf0eb07c627d3f3b789cf36759 (diff)
downloadluaotfload-68eaaa92a2235f4b56f45168e987146171cb1518.tar.gz
[features] import latest changes to the feature handler
Diffstat (limited to 'src/luaotfload-features.lua')
-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" }