From 7b107268d43038815d72037d28dbb3a3e4331d64 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 19 Apr 2013 16:29:00 +0200 Subject: beta 2013.04.19 16:29 --- tex/generic/context/luatex/luatex-fonts-merged.lua | 30 +++++++--------------- 1 file changed, 9 insertions(+), 21 deletions(-) (limited to 'tex/generic') diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 44f42edee..e8eb49c9c 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 : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 04/17/13 18:36:10 +-- merge date : 04/19/13 16:29:24 do -- begin closure to overcome local limits and interference @@ -1401,7 +1401,7 @@ function table.tofile(filename,root,name,specification) io.flush() end end -local function flattened(t,f,depth) +local function flattened(t,f,depth) if f==nil then f={} depth=0xFFFF @@ -1416,19 +1416,16 @@ local function flattened(t,f,depth) if depth>0 and type(v)=="table" then flattened(v,f,depth-1) else - f[k]=v + f[#f+1]=v end end end - local n=#f for k=1,#t do local v=t[k] if depth>0 and type(v)=="table" then flattened(v,f,depth-1) - n=#f else - n=n+1 - f[n]=v + f[#f+1]=v end end return f @@ -10579,18 +10576,7 @@ function definers.loadfont(specification) end return tfmdata end -local function checkvirtual(tfmdata) - local fonts=tfmdata.fonts - local selfid=font.nextid() - if fonts and #fonts>0 then - for i=1,#fonts do - if fonts[i][2]==0 then - fonts[i][2]=selfid - end - end - else - tfmdata.fonts={ "id",selfid } - end +function constructors.checkvirtualids() end function constructors.readanddefine(name,size) local specification=definers.analyze(name,size) @@ -10604,7 +10590,7 @@ function constructors.readanddefine(name,size) if not id then local tfmdata=definers.loadfont(specification) if tfmdata then - checkvirtual(tfmdata) + constructors.checkvirtualids(tfmdata) id=font.define(tfmdata) definers.register(tfmdata,id) else @@ -10625,7 +10611,9 @@ end function definers.register(tfmdata,id) if tfmdata and id then local hash=tfmdata.properties.hash - if not internalized[hash] then + if not hash then + report_defining("registering font, id %a, name %a, invalid hash",id,tfmdata.properties.filename or "?") + elseif not internalized[hash] then internalized[hash]=id if trace_defining then report_defining("registering font, id %s, hash %a",id,hash) -- cgit v1.2.3