summaryrefslogtreecommitdiff
path: root/tex/generic
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2009-09-23 10:07:00 +0200
committerHans Hagen <pragma@wxs.nl>2009-09-23 10:07:00 +0200
commitdebb4feb8ae38805ed81932e37c58285cb6dcc1c (patch)
tree19ad526cc0e93656eeaf1ed811a20af153782613 /tex/generic
parentd237f3e4386c910e8960a9ec6cba2e7f59d1268a (diff)
downloadcontext-debb4feb8ae38805ed81932e37c58285cb6dcc1c.tar.gz
beta 2009.09.23 10:07
Diffstat (limited to 'tex/generic')
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua23
1 files changed, 13 insertions, 10 deletions
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index 3ca17ac6d..a07ca9466 100644
--- a/tex/generic/context/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts.lua
--- merge date : 09/21/09 17:40:59
+-- merge date : 09/23/09 10:11:52
do -- begin closure to overcome local limits and interference
@@ -7613,16 +7613,19 @@ local function alternative_glyph(start,alternatives,kind,chainname,chainlookupna
value, choice = format("first, choice %s",1), alternatives[1]
elseif value == "last" then
value, choice = format("last, choice %s",n), alternatives[n]
- elseif type(value) ~= "number" then
- value, choice = "default, choice 1", alternatives[1]
- elseif value > n then
- value, choice = format("no %s variants, taking %s",value,n), alternatives[n]
- elseif value == 0 then
- value, choice = format("choice %s (no change)",value), start.char
- elseif value < 1 then
- value, choice = format("no %s variants, taking %s",value,1), alternatives[1]
else
- value, choice = format("choice %s",value), alternatives[value]
+ value = tonumber(value)
+ if type(value) ~= "number" then
+ value, choice = "default, choice 1", alternatives[1]
+ elseif value > n then
+ value, choice = format("no %s variants, taking %s",value,n), alternatives[n]
+ elseif value == 0 then
+ value, choice = format("choice %s (no change)",value), start.char
+ elseif value < 1 then
+ value, choice = format("no %s variants, taking %s",value,1), alternatives[1]
+ else
+ value, choice = format("choice %s",value), alternatives[value]
+ end
end
if not choice then
logwarning("%s: no variant %s for %s",cref(kind,chainname,chainlookupname,lookupname),value,gref(start.char))