summaryrefslogtreecommitdiff
path: root/tex/context/base/font-otn.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/font-otn.lua')
-rw-r--r--tex/context/base/font-otn.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/tex/context/base/font-otn.lua b/tex/context/base/font-otn.lua
index babf8b0d5..d9dc20f6c 100644
--- a/tex/context/base/font-otn.lua
+++ b/tex/context/base/font-otn.lua
@@ -412,7 +412,11 @@ function handlers.gsub_single(start,kind,lookupname,replacement)
end
local function alternative_glyph(start,alternatives,kind,chainname,chainlookupname,lookupname) -- chainname and chainlookupname optional
- local value, choice, n = featurevalue or tfmdata.shared.features[kind], nil, #alternatives -- global value, brrr
+ -- needs checking: (global value, brrr)
+ local value = featurevalue == true and tfmdata.shared.features[kind] or featurevalue
+ local choice = nil
+ local n = #alternatives
+ --
if value == "random" then
local r = random(1,n)
value, choice = format("random, choice %s",r), alternatives[r]