summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-01-18 22:36:39 +0000
committerKarl Berry <karl@freefriends.org>2019-01-18 22:36:39 +0000
commit9fe86978e3c05cc8ffe90251487f8240f3765402 (patch)
treefcccbc6193e9111774462036fb5a130adad6319e /Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua
parent1da73770bc3b5546208cb6511e69cbc7f86bc33e (diff)
luaotfload (18jan19)
git-svn-id: svn://tug.org/texlive/trunk@49747 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua31
1 files changed, 24 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua
index 526fb6f0fc6..b33bb861227 100644
--- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua
+++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua
@@ -5,8 +5,8 @@
local ProvidesLuaModule = {
name = "luaotfload-features",
- version = "2.93", --TAGVERSION
- date = "2018-10-28", --TAGDATE
+ version = "2.94", --TAGVERSION
+ date = "2018-12-19", --TAGDATE
description = "luaotfload submodule / features",
license = "GPL v2.0",
author = "Hans Hagen, Khaled Hosny, Elie Roux, Philipp Gesang, Marcel Krüger",
@@ -1217,6 +1217,21 @@ local handle_request = function (specification)
return handle_combination (request.combo, specification)
end
+ local features = specification.features
+ if not features then
+ features = { }
+ specification.features = features
+ end
+
+ features.raw = request.features or {}
+ request.features = {}
+ for k, v in pairs(features.raw) do
+ if type(v) == 'string' then
+ v = string.lower(v)
+ v = ({['true'] = true, ['false'] = false})[v] or v
+ end
+ request.features[k] = v
+ end
request.features = apply_default_features(request.features)
if name then
@@ -1250,11 +1265,6 @@ local handle_request = function (specification)
--- The next line sets the “rand” feature to “random”; I haven’t
--- investigated it any further (luatex-fonts-ext), so it will
--- just stay here.
- local features = specification.features
- if not features then
- features = { }
- specification.features = features
- end
features.normal = normalize (request.features)
local subfont = tonumber (request.sub)
if subfont and subfont >= 0 then
@@ -1262,6 +1272,13 @@ local handle_request = function (specification)
else
specification.sub = false
end
+
+ if request.features and request.features.mode
+ and fonts.readers[request.features.mode] then
+ specification.forced = request.features.mode
+ return specification
+ end
+
return specification
end