summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-features.lua
diff options
context:
space:
mode:
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