summaryrefslogtreecommitdiff
path: root/tex/generic
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-06-29 10:01:29 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-06-29 10:01:29 +0200
commit852668a65c878fee10d21fb7cefafb390e083075 (patch)
treead90768e0796b77ea69c11d024aa58dce114af1d /tex/generic
parentf8d48a62bd62df77685bd8581c1b8311ae26525f (diff)
downloadcontext-852668a65c878fee10d21fb7cefafb390e083075.tar.gz
2017-06-29 09:41:00
Diffstat (limited to 'tex/generic')
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua39
1 files changed, 25 insertions, 14 deletions
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 5d67d8059..d793cdf04 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/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 : 06/27/17 18:05:12
+-- merge date : 06/29/17 09:34:20
do -- begin closure to overcome local limits and interference
@@ -29044,7 +29044,7 @@ do
local dup=P("dup")
local put=P("put")
local array=P("array")
- local name=P("/")*C((R("az")+R("AZ")+R("09")+S("-_."))^1)
+ local name=P("/")*C((R("az","AZ","09")+S("-_."))^1)
local digits=R("09")^1
local cardinal=digits/tonumber
local spaces=P(" ")^1
@@ -29055,30 +29055,38 @@ do
m=size
return position+1
end
- local setroutine=function(str,position,index,size)
+ local setroutine=function(str,position,index,size,filename)
local forward=position+tonumber(size)
local stream=decrypt(sub(str,position+1,forward),4330,4)
routines[index]={ byte(stream,1,#stream) }
return forward
end
- local setvector=function(str,position,name,size)
+ local setvector=function(str,position,name,size,filename)
local forward=position+tonumber(size)
if n>=m then
return #str
elseif forward<#str then
+ if n==0 and name~=".notdef" then
+ report_pfb("reserving .notdef at index 0 in %a",filename)
+ n=n+1
+ end
vector[n]=name
- n=n+1
+ n=n+1
return forward
else
return #str
end
end
- local setshapes=function(str,position,name,size)
+ local setshapes=function(str,position,name,size,filename)
local forward=position+tonumber(size)
local stream=sub(str,position+1,forward)
if n>m then
return #str
elseif forward<#str then
+ if n==0 and name~=".notdef" then
+ report_pfb("reserving .notdef at index 0 in %a",filename)
+ n=n+1
+ end
vector[n]=name
n=n+1
chars [n]=decrypt(stream,4330,4)
@@ -29091,11 +29099,11 @@ do
local p_np=spacing*(P("NP")+P("|"))
local p_nd=spacing*(P("ND")+P("|"))
local p_filterroutines=
- (1-subroutines)^0*subroutines*spaces*Cmt(cardinal,initialize)*(Cmt(cardinal*spaces*cardinal*p_rd,setroutine)*p_np+P(1))^1
+ (1-subroutines)^0*subroutines*spaces*Cmt(cardinal,initialize)*(Cmt(cardinal*spaces*cardinal*p_rd*Carg(1),setroutine)*p_np+P(1))^1
local p_filtershapes=
- (1-charstrings)^0*charstrings*spaces*Cmt(cardinal,initialize)*(Cmt(name*spaces*cardinal*p_rd,setshapes)*p_nd+P(1))^1
+ (1-charstrings)^0*charstrings*spaces*Cmt(cardinal,initialize)*(Cmt(name*spaces*cardinal*p_rd*Carg(1),setshapes)*p_nd+P(1))^1
local p_filternames=Ct (
- (1-charstrings)^0*charstrings*spaces*Cmt(cardinal,initialize)*(Cmt(name*spaces*cardinal,setvector)+P(1))^1
+ (1-charstrings)^0*charstrings*spaces*Cmt(cardinal,initialize)*(Cmt(name*spaces*cardinal*Carg(1),setvector)+P(1))^1
)
local p_filterencoding=(1-encoding)^0*encoding*spaces*digits*spaces*array*(1-dup)^0*Cf(
Ct("")*Cg(spacing*dup*spaces*cardinal*spaces*name*spaces*put)^1
@@ -29121,8 +29129,8 @@ do
local glyphs={}
routines,vector,chars={},{},{}
if shapestoo then
- lpegmatch(p_filterroutines,binary)
- lpegmatch(p_filtershapes,binary)
+ lpegmatch(p_filterroutines,binary,1,filename)
+ lpegmatch(p_filtershapes,binary,1,filename)
local data={
dictionaries={
{
@@ -29134,7 +29142,7 @@ do
}
fonts.handlers.otf.readers.parsecharstrings(false,data,glyphs,true,true)
else
- lpegmatch(p_filternames,binary)
+ lpegmatch(p_filternames,binary,1,filename)
end
names=vector
routines,vector,chars=nil,nil,nil
@@ -29150,7 +29158,7 @@ do
if trace_loading then
report_afm("getting index data from %a",pfbname)
end
- for index=1,#vector do
+ for index=0,#vector do
local name=vector[index]
local char=characters[name]
if char then
@@ -29158,6 +29166,10 @@ do
report_afm("glyph %a has index %a",name,index)
end
char.index=index
+ else
+ if trace_indexing then
+ report_afm("glyph %a has index %a but no data",name,index)
+ end
end
end
end
@@ -29263,7 +29275,6 @@ local p_parameters=P(false)+fontdata*((P("FontName")+P("FullName")+P("FamilyName
+(fontdata*C("AXISHEIGHT")*number*rest)/set_1
)
local fullparser=(P("StartFontMetrics")*fontdata*name/start )*(p_charmetrics+p_kernpairs+p_parameters+(1-P("EndFontMetrics")) )^0*(P("EndFontMetrics")/stop )
-local fullparser=(P("StartFontMetrics")*fontdata*name/start )*(p_charmetrics+p_kernpairs+p_parameters+(1-P("EndFontMetrics")) )^0*(P("EndFontMetrics")/stop )
local infoparser=(P("StartFontMetrics")*fontdata*name/start )*(p_parameters+(1-P("EndFontMetrics")) )^0*(P("EndFontMetrics")/stop )
local function read(filename,parser)
local afmblob=io.loaddata(filename)