summaryrefslogtreecommitdiff
path: root/src/luaotfload-features.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2015-12-21 06:19:24 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2015-12-21 06:19:33 +0100
commite7347ebd913a5f080946f3d4d9e9ccbf060cacc5 (patch)
tree47b31fd2ab623dc663435375bc228bdcb06359d0 /src/luaotfload-features.lua
parent92b6110cfde6deb63e328d47965bfa6ea26d35a1 (diff)
downloadluaotfload-e7347ebd913a5f080946f3d4d9e9ccbf060cacc5.tar.gz
[features] pull in upstream fixes
Fixes the crash but apparently not the feature.
Diffstat (limited to 'src/luaotfload-features.lua')
-rw-r--r--src/luaotfload-features.lua16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/luaotfload-features.lua b/src/luaotfload-features.lua
index 749ffec..322a020 100644
--- a/src/luaotfload-features.lua
+++ b/src/luaotfload-features.lua
@@ -968,6 +968,8 @@ setmetatableindex(types, function(t,k) t[k] = k return k end) -- "key"
local everywhere = { ["*"] = { ["*"] = true } } -- or: { ["*"] = { "*" } }
local noflags = { }
+local tohash = table.tohash
+
local function addfeature(data,feature,specifications)
local descriptions = data.descriptions
local resources = data.resources
@@ -1016,17 +1018,18 @@ local function addfeature(data,feature,specifications)
end
local askedfeatures = specification.features or everywhere
local askedsteps = specifications.steps or specification.subtables or { specification.data } or { }
- local featuretype = normalized[specification.type or "substitution"] or "substitution"
+ local defaulttype = specification.type 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 list = askedsteps[i]
+ local coverage = { }
+ local cover = coveractions[featuretype]
+ local format = nil
+ local featuretype = normalized[list.type or defaulttype] or "substitution"
if not cover then
-- unknown
elseif featuretype == "substitution" then
@@ -1166,7 +1169,7 @@ local function addfeature(data,feature,specifications)
-- script = { lang1, lang2, lang3 } or script = { lang1 = true, ... }
for k, v in next, askedfeatures do
if v[1] then
- askedfeatures[k] = table.tohash(v)
+ askedfeatures[k] = tohash(v)
end
end
local sequence = {
@@ -1212,6 +1215,7 @@ local function addfeature(data,feature,specifications)
end
end
+
---[[ end snippet from font-otc.lua ]]
local tlig_order = { "tlig" }