From 8b7c04b3f228340eddb1cd1a82f95af652812536 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 15 May 2015 23:23:10 +0000 Subject: context from current for tl15 git-svn-id: svn://tug.org/texlive/trunk@37419 c570f23f-e606-0410-a88d-b1316a301751 --- .../generic/context/luatex/luatex-fonts-merged.lua | 169 ++++++++++----------- .../generic/context/luatex/luatex-fonts-otn.lua | 20 +-- 2 files changed, 82 insertions(+), 107 deletions(-) (limited to 'Master/texmf-dist/tex/generic/context/luatex') diff --git a/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua b/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua index 0e0e5ebba0e..81883b8b8fc 100644 --- a/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 05/13/15 23:52:22 +-- merge date : 05/15/15 23:03:46 do -- begin closure to overcome local limits and interference @@ -1041,7 +1041,7 @@ end function table.keys(t) if t then local keys,k={},0 - for key,_ in next,t do + for key in next,t do k=k+1 keys[k]=key end @@ -1052,32 +1052,51 @@ function table.keys(t) end local function compare(a,b) local ta=type(a) - local tb=type(b) - if ta==tb and ta=="number" then - return a1 then + sort(srt) + end return srt else return {} @@ -1105,13 +1126,15 @@ end local function sortedindexonly(tab) if tab then local srt,s={},0 - for key,_ in next,tab do + for key in next,tab do if type(key)=="number" then s=s+1 srt[s]=key end end - sort(srt) + if s>1 then + sort(srt) + end return srt else return {} @@ -1120,13 +1143,15 @@ end local function sortedhashkeys(tab,cmp) if tab then local srt,s={},0 - for key,_ in next,tab do + for key in next,tab do if key then s=s+1 srt[s]=key end end - sort(srt,cmp) + if s>1 then + sort(srt,cmp) + end return srt else return {} @@ -1135,7 +1160,7 @@ end function table.allkeys(t) local keys={} for k,v in next,t do - for k,v in next,v do + for k in next,v do keys[k]=true end end @@ -1154,19 +1179,21 @@ local function sortedhash(t,cmp) else s=sortedkeys(t) end - local n=0 local m=#s - local function kv() - if n0 then + local n=0 + return function() + if n0 then + local nt=#t + if nt>0 then local n=0 for _,v in next,t do n=n+1 end - if n==#t then - local tt,nt={},0 - for i=1,#t do + if n==nt then + local tt={} + for i=1,nt do local v=t[i] local tv=type(v) if tv=="number" then - nt=nt+1 if hexify then - tt[nt]=format("0x%X",v) + tt[i]=format("0x%X",v) else - tt[nt]=tostring(v) + tt[i]=tostring(v) end elseif tv=="string" then - nt=nt+1 - tt[nt]=format("%q",v) + tt[i]=format("%q",v) elseif tv=="boolean" then - nt=nt+1 - tt[nt]=v and "true" or "false" + tt[i]=v and "true" or "false" else - tt=nil - break + return nil end end return tt @@ -1394,7 +1418,8 @@ local function do_serialize(root,name,depth,level,indexed) for i=1,#sk do local k=sk[i] local v=root[k] - local tv,tk=type(v),type(k) + local tv=type(v) + local tk=type(k) if compact and first and tk=="number" and k>=first and k<=last then if tv=="number" then if hexify then @@ -1403,11 +1428,7 @@ local function do_serialize(root,name,depth,level,indexed) handle(format("%s %s,",depth,v)) end elseif tv=="string" then - if reduce and tonumber(v) then - handle(format("%s %s,",depth,v)) - else - handle(format("%s %q,",depth,v)) - end + handle(format("%s %q,",depth,v)) elseif tv=="table" then if next(v)==nil then handle(format("%s {},",depth)) @@ -1463,34 +1484,18 @@ local function do_serialize(root,name,depth,level,indexed) end end elseif tv=="string" then - if reduce and tonumber(v) then - if tk=="number" then - if hexify then - handle(format("%s [0x%X]=%s,",depth,k,v)) - else - handle(format("%s [%s]=%s,",depth,k,v)) - end - elseif tk=="boolean" then - handle(format("%s [%s]=%s,",depth,k and "true" or "false",v)) - elseif noquotes and not reserved[k] and lpegmatch(propername,k) then - handle(format("%s %s=%s,",depth,k,v)) + if tk=="number" then + if hexify then + handle(format("%s [0x%X]=%q,",depth,k,v)) else - handle(format("%s [%q]=%s,",depth,k,v)) + handle(format("%s [%s]=%q,",depth,k,v)) end + elseif tk=="boolean" then + handle(format("%s [%s]=%q,",depth,k and "true" or "false",v)) + elseif noquotes and not reserved[k] and lpegmatch(propername,k) then + handle(format("%s %s=%q,",depth,k,v)) else - if tk=="number" then - if hexify then - handle(format("%s [0x%X]=%q,",depth,k,v)) - else - handle(format("%s [%s]=%q,",depth,k,v)) - end - elseif tk=="boolean" then - handle(format("%s [%s]=%q,",depth,k and "true" or "false",v)) - elseif noquotes and not reserved[k] and lpegmatch(propername,k) then - handle(format("%s %s=%q,",depth,k,v)) - else - handle(format("%s [%q]=%q,",depth,k,v)) - end + handle(format("%s [%q]=%q,",depth,k,v)) end elseif tv=="table" then if next(v)==nil then @@ -1587,7 +1592,6 @@ local function serialize(_handle,root,name,specification) noquotes=specification.noquotes hexify=specification.hexify handle=_handle or specification.handle or print - reduce=specification.reduce or false functions=specification.functions compact=specification.compact inline=specification.inline and compact @@ -1604,7 +1608,6 @@ local function serialize(_handle,root,name,specification) noquotes=false hexify=false handle=_handle or print - reduce=false compact=true inline=true functions=true @@ -12719,15 +12722,8 @@ local function normal_handle_contextchain(head,start,kind,chainname,contexts,seq break end end - elseif f==2 then - match=seq[1][32] else - for n=f-1,1 do - if not seq[n][32] then - match=false - break - end - end + match=false end end if match and s>l then @@ -12777,15 +12773,8 @@ local function normal_handle_contextchain(head,start,kind,chainname,contexts,seq break end end - elseif s-l==1 then - match=seq[s][32] else - for n=l+1,s do - if not seq[n][32] then - match=false - break - end - end + match=false end end end diff --git a/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-otn.lua b/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-otn.lua index 343e1826e0f..dd3aa61530d 100644 --- a/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-otn.lua +++ b/Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-otn.lua @@ -376,7 +376,7 @@ local function copy_glyph(g) -- next and prev are untouched ! end end --- +-- -- start is a mark and we need to keep that one @@ -1834,15 +1834,8 @@ local function normal_handle_contextchain(head,start,kind,chainname,contexts,seq break end end - elseif f == 2 then - match = seq[1][32] else - for n=f-1,1 do - if not seq[n][32] then - match = false - break - end - end + match = false end end -- after @@ -1895,15 +1888,8 @@ local function normal_handle_contextchain(head,start,kind,chainname,contexts,seq break end end - elseif s-l == 1 then - match = seq[s][32] else - for n=l+1,s do - if not seq[n][32] then - match = false - break - end - end + match = false end end end -- cgit v1.2.3