summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/context
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/context')
-rw-r--r--Master/texmf-dist/tex/generic/context/luatex/luatex-fonts-merged.lua63
1 files changed, 41 insertions, 22 deletions
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 22692b5667c..efb7aebff80 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 : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 04/21/16 19:35:29
+-- merge date : 04/27/16 00:00:41
do -- begin closure to overcome local limits and interference
@@ -6984,7 +6984,7 @@ local fonts,logs,trackers,containers,resolvers=fonts,logs,trackers,containers,re
local next,type,tonumber=next,type,tonumber
local match,gmatch,lower,gsub,strip,find=string.match,string.gmatch,string.lower,string.gsub,string.strip,string.find
local char,byte,sub=string.char,string.byte,string.sub
-local abs,mod=math.abs,math.mod
+local abs=math.abs
local bxor,rshift=bit32.bxor,bit32.rshift
local P,S,R,Cmt,C,Ct,Cs,lpegmatch,patterns=lpeg.P,lpeg.S,lpeg.R,lpeg.Cmt,lpeg.C,lpeg.Ct,lpeg.Cs,lpeg.match,lpeg.patterns
local derivetable=table.derive
@@ -7002,7 +7002,7 @@ local afm=constructors.newhandler("afm")
local pfb=constructors.newhandler("pfb")
local afmfeatures=constructors.newfeatures("afm")
local registerafmfeature=afmfeatures.register
-afm.version=1.500
+afm.version=1.501
afm.cache=containers.define("fonts","afm",afm.version,true)
afm.autoprefixed=true
afm.helpdata={}
@@ -7183,7 +7183,7 @@ do
local function step(c)
local cipher=byte(c)
local plain=bxor(cipher,rshift(r,8))
- r=mod((cipher+r)*c1+c2,65536)
+ r=((cipher+r)*c1+c2)%65536
return char(plain)
end
decrypt=function(binary)
@@ -7367,7 +7367,8 @@ end
local uparser=fonts.mappings.makenameparser()
unify=function(data,filename)
local unicodevector=fonts.encodings.agl.unicodes
- local unicodes,names={},{}
+ local unicodes={}
+ local names={}
local private=constructors.privateoffset
local descriptions=data.descriptions
for name,blob in next,data.characters do
@@ -8248,7 +8249,7 @@ local next,type,unpack=next,type,unpack
local byte,lower,char,strip,gsub=string.byte,string.lower,string.char,string.strip,string.gsub
local bittest=bit32.btest
local concat,remove,unpack,fastcopy=table.concat,table.remov,table.unpack,table.fastcopy
-local floor,mod,abs,sqrt,round=math.floor,math.mod,math.abs,math.sqrt,math.round
+local floor,abs,sqrt,round=math.floor,math.abs,math.sqrt,math.round
local P,R,S,C,Cs,Cc,Ct,Carg,Cmt=lpeg.P,lpeg.R,lpeg.S,lpeg.C,lpeg.Cs,lpeg.Cc,lpeg.Ct,lpeg.Carg,lpeg.Cmt
local lpegmatch=lpeg.match
local setmetatableindex=table.setmetatableindex
@@ -8951,10 +8952,10 @@ formatreaders[4]=function(f,fontdata,offset)
elseif offset==0xFFFF then
elseif offset==0 then
if trace_cmap then
- report("format 4.%i segment %2i from %C upto %C at index %H",1,segment,startchar,endchar,mod(startchar+delta,65536))
+ report("format 4.%i segment %2i from %C upto %C at index %H",1,segment,startchar,endchar,(startchar+delta)%65536)
end
for unicode=startchar,endchar do
- local index=mod(unicode+delta,65536)
+ local index=(unicode+delta)%65536
if index and index>0 then
local glyph=glyphs[index]
if glyph then
@@ -8983,13 +8984,13 @@ formatreaders[4]=function(f,fontdata,offset)
else
local shift=(segment-nofsegments+offset/2)-startchar
if trace_cmap then
- report("format 4.%i segment %2i from %C upto %C at index %H",0,segment,startchar,endchar,mod(startchar+delta,65536))
+ report("format 4.%i segment %2i from %C upto %C at index %H",0,segment,startchar,endchar,(startchar+delta)%65536)
end
for unicode=startchar,endchar do
local slot=shift+unicode
local index=indices[slot]
if index and index>0 then
- index=mod(index+delta,65536)
+ index=(index+delta)%65536
local glyph=glyphs[index]
if glyph then
local gu=glyph.unicode
@@ -16679,8 +16680,6 @@ local attributes,nodes,node=attributes,nodes,node
fonts=fonts
local hashes=fonts.hashes
local fontdata=hashes.identifiers
-local parameters=fonts.hashes.parameters
-local resources=fonts.hashes.resources
nodes.injections=nodes.injections or {}
local injections=nodes.injections
local tracers=nodes.tracers
@@ -17870,7 +17869,7 @@ local function injectspaces(head)
local function updatefont(font,trig)
leftkerns=trig.left
rightkerns=trig.right
- local par=parameters[font]
+ local par=fontdata[font].parameters
factor=par.factor
threshold=par.spacing.width-1
lastfont=font
@@ -18718,7 +18717,21 @@ local function toligature(head,start,stop,char,dataset,sequence,markflag,discfou
local pre,post,replace,pretail,posttail,replacetail=getdisc(discfound,true)
if not replace then
local prev=getprev(base)
- local copied=copy_node_list(comp)
+local current=comp
+local previous=nil
+local copied=nil
+while current do
+ if getid(current)==glyph_code then
+ local n=copy_node(current)
+ if copied then
+ setlink(previous,n)
+ else
+ copied=n
+ end
+ previous=n
+ end
+ current=getnext(current)
+end
setprev(discnext,nil)
setnext(discprev,nil)
if pre then
@@ -20023,7 +20036,7 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode)
else
local discfound=nil
local n=f+1
- last=getnext(last)
+ last=getnext(last)
while n<=l do
if not last and (sweeptype=="post" or sweeptype=="replace") then
last=getnext(sweepnode)
@@ -20064,7 +20077,6 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode)
end
break
end
- last=getnext(last)
elseif char==false then
if discfound then
notmatchreplace[discfound]=true
@@ -20149,8 +20161,12 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode)
if trace_skips then
show_skip(dataset,sequence,char,ck,class)
end
+ prev=getprev(prev)
elseif seq[n][char] then
- n=n -1
+ if n>1 then
+ prev=getprev(prev)
+ end
+ n=n-1
else
if discfound then
notmatchreplace[discfound]=true
@@ -20169,7 +20185,6 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode)
end
break
end
- prev=getprev(prev)
elseif char==false then
if discfound then
notmatchreplace[discfound]=true
@@ -20231,19 +20246,19 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode)
if not match then
break
end
- else
end
- else
end
+ prev=getprev(prev)
elseif seq[n][32] then
n=n-1
+ prev=getprev(prev)
else
match=false
break
end
- prev=getprev(prev)
elseif seq[n][32] then
n=n-1
+ prev=getprev(prev)
else
match=false
break
@@ -20278,7 +20293,11 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode)
if trace_skips then
show_skip(dataset,sequence,char,ck,class)
end
+ current=getnext(current)
elseif seq[n][char] then
+ if n<s then
+ current=getnext(current)
+ end
n=n+1
else
if discfound then
@@ -20361,7 +20380,7 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode)
current=getnext(current)
elseif seq[n][32] then
n=n+1
-current=getnext(current)
+ current=getnext(current)
else
match=false
break