summaryrefslogtreecommitdiff
path: root/tex/context/base/font-otn.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2011-08-18 17:40:23 +0300
committerMarius <mariausol@gmail.com>2011-08-18 17:40:23 +0300
commit5463542d926a6ca73d86251154cabc00a9333fa5 (patch)
tree33c0104835277e96d6b0474466e75963fef16de4 /tex/context/base/font-otn.lua
parentee4f24d635e0db2029f026a1c098ae76d1e537d3 (diff)
downloadcontext-5463542d926a6ca73d86251154cabc00a9333fa5.tar.gz
beta 2011.08.18 16:00
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]