diff options
author | Hans Hagen <pragma@wxs.nl> | 2011-08-18 16:00:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2011-08-18 16:00:00 +0200 |
commit | 4e9248d3c8103ea8758c6173f7e3af603e0da642 (patch) | |
tree | 1f7f551567c93e3a62accc4c0d7e68a8169ab99f /tex/context/base/font-otn.lua | |
parent | e7b67a4f409457e80dde3a5383071869ace85685 (diff) | |
download | context-4e9248d3c8103ea8758c6173f7e3af603e0da642.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.lua | 6 |
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] |