diff options
Diffstat (limited to 'tex/generic/context')
-rw-r--r-- | tex/generic/context/luatex-fonts-merged.lua | 34 | ||||
-rw-r--r-- | tex/generic/context/luatex-mplib.lua | 2 |
2 files changed, 20 insertions, 16 deletions
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index a709be033..56c7c59d5 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 : 01/05/10 16:51:52 +-- merge date : 01/09/10 00:02:29 do -- begin closure to overcome local limits and interference @@ -6518,13 +6518,15 @@ otf.enhancers["reorganize kerns"] = function(data,filename) local offset = offsets[baseoffset + sk] --~ local offset = offsets[sk] -- (fk-1) * maxseconds + sk] local splt = split[sv] - for i=1,#splt do - local second_unicode = splt[i] - if tonumber(second_unicode) then - lookupkerns[second_unicode] = offset - else - for s=1,#second_unicode do - lookupkerns[second_unicode[s]] = offset + if splt then + for i=1,#splt do + local second_unicode = splt[i] + if tonumber(second_unicode) then + lookupkerns[second_unicode] = offset + else + for s=1,#second_unicode do + lookupkerns[second_unicode[s]] = offset + end end end end @@ -6536,13 +6538,15 @@ otf.enhancers["reorganize kerns"] = function(data,filename) for fk=1,#firsts do local fv = firsts[fk] local splt = split[fv] - for i=1,#splt do - local first_unicode = splt[i] - if tonumber(first_unicode) then - do_it(fk,first_unicode) - else - for f=1,#first_unicode do - do_it(fk,first_unicode[f]) + if splt then + for i=1,#splt do + local first_unicode = splt[i] + if tonumber(first_unicode) then + do_it(fk,first_unicode) + else + for f=1,#first_unicode do + do_it(fk,first_unicode[f]) + end end end end diff --git a/tex/generic/context/luatex-mplib.lua b/tex/generic/context/luatex-mplib.lua index 259a5e646..0afad083a 100644 --- a/tex/generic/context/luatex-mplib.lua +++ b/tex/generic/context/luatex-mplib.lua @@ -320,7 +320,7 @@ else metapost.report("flushing figure %s",f) local figure = figures[f] local objects = getobjects(result,figure,f) - local fignum = match(tonumber((figure:filename())),"([%d]+)$") or figure:charcode() or 0) + local fignum = tonumber(match(figure:filename(),"([%d]+)$") or figure:charcode() or 0) local miterlimit, linecap, linejoin, dashed = -1, -1, -1, false local bbox = figure:boundingbox() local llx, lly, urx, ury = bbox[1], bbox[2], bbox[3], bbox[4] -- faster than unpack |