From e7347ebd913a5f080946f3d4d9e9ccbf060cacc5 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Mon, 21 Dec 2015 06:19:24 +0100 Subject: [features] pull in upstream fixes Fixes the crash but apparently not the feature. --- src/luaotfload-features.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src') 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" } -- cgit v1.2.3