summaryrefslogtreecommitdiff
path: root/src/luaotfload-features.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2016-04-17 22:12:10 +0200
committerPhilipp Gesang <phg@phi-gamma.net>2016-04-17 22:12:15 +0200
commitb6569eef1dc488aafbdef8a12ddd68cdef1d5b72 (patch)
tree3f814ad254b759f746095ba7a93e70ce1cf85eb5 /src/luaotfload-features.lua
parentec774e0e4d16ed440e6b892a7325b304aec82e71 (diff)
downloadluaotfload-b6569eef1dc488aafbdef8a12ddd68cdef1d5b72.tar.gz
[features] account for subfont indexing changes
The new Lua based loader consistently numbers subfonts from one, not zero like the Fontforge one. We correct the value immediately before passing a handled font request on to the loader.
Diffstat (limited to 'src/luaotfload-features.lua')
-rw-r--r--src/luaotfload-features.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/luaotfload-features.lua b/src/luaotfload-features.lua
index 16422db..9817e0b 100644
--- a/src/luaotfload-features.lua
+++ b/src/luaotfload-features.lua
@@ -1246,6 +1246,10 @@ local handle_request = function (specification)
--- investigated it any further (luatex-fonts-ext), so it will
--- just stay here.
specification.features.normal = normalize (request.features)
+ local subfont = tonumber (specification.sub)
+ if subfont and subfont >= 0 then
+ specification.sub = subfont + 1
+ end
return specification
end