From 47852e5715e7c0374bb6bc173c1728908549e1ed Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Wed, 24 Jul 2019 13:08:53 +0200 Subject: 2019-07-24 11:24:00 --- tex/generic/context/luatex/luatex-fonts-merged.lua | 61 +++++++++++++++------- 1 file changed, 41 insertions(+), 20 deletions(-) (limited to 'tex/generic/context/luatex/luatex-fonts-merged.lua') diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 49621663d..65c823a66 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 : 07/16/19 18:23:09 +-- merge date : 07/24/19 11:17:48 do -- begin closure to overcome local limits and interference @@ -1988,7 +1988,7 @@ end local function sequenced(t,sep,simple) if not t then return "" - elseif type(t)=="string" then + elseif type(t)~="table" then return t end local n=#t @@ -2027,7 +2027,11 @@ local function sequenced(t,sep,simple) end end end - return concat(s,sep or " | ") + if sep==true then + return "{ "..concat(s,", ").." }" + else + return concat(s,sep or " | ") + end end table.sequenced=sequenced function table.print(t,...) @@ -10830,8 +10834,9 @@ local sortedhash=table.sortedhash local stripstring=string.nospaces local utf16_to_utf8_be=utf.utf16_to_utf8_be local report=logs.reporter("otf reader") -local trace_cmap=false -local trace_cmap_detail=false +local report_cmap=logs.reporter("otf reader","cmap") +local trace_cmap=false trackers.register("otf.cmap",function(v) trace_cmap=v end) +local trace_cmap_details=false trackers.register("otf.cmap.details",function(v) trace_cmap_details=v end) fonts=fonts or {} local handlers=fonts.handlers or {} fonts.handlers=handlers @@ -11493,7 +11498,7 @@ readers.vmtx=function(f,fontdata,specification) local glyphs=fontdata.glyphs local nofglyphs=fontdata.nofglyphs local vheight=0 - local vdefault=verticalheader.ascender+verticalheader.descender + local vdefault=verticalheader.ascender-verticalheader.descender local topsidebearing=0 for i=0,nofmetrics-1 do local glyph=glyphs[i] @@ -11502,6 +11507,9 @@ readers.vmtx=function(f,fontdata,specification) if vheight~=0 and vheight~=vdefault then glyph.vheight=vheight end + if topsidebearing~=0 then + glyph.tsb=topsidebearing + end end for i=nofmetrics,nofglyphs-1 do local glyph=glyphs[i] @@ -11583,7 +11591,7 @@ local sequence={ { 0,0,6 }, { 3,0,6 }, { 0,5,14 }, -{ 0,4,12 }, + { 0,4,12 }, { 3,10,13 }, } local supported={} @@ -11628,7 +11636,7 @@ formatreaders[4]=function(f,fontdata,offset) elseif startchar==0xFFFF and offset==0 then elseif offset==0xFFFF then elseif offset==0 then - if trace_cmap_detail then + if trace_cmap_details then 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 @@ -11660,8 +11668,8 @@ formatreaders[4]=function(f,fontdata,offset) end else local shift=(segment-nofsegments+offset/2)-startchar - if trace_cmap_detail then - report("format 4.%i segment %2i from %C upto %C at index %H",0,segment,startchar,endchar,(startchar+delta)%65536) + if trace_cmap_details then + report_cmap("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 @@ -11708,8 +11716,8 @@ formatreaders[6]=function(f,fontdata,offset) local count=readushort(f) local stop=start+count-1 local nofdone=0 - if trace_cmap_detail then - report("format 6 from %C to %C",2,start,stop) + if trace_cmap_details then + report_cmap("format 6 from %C to %C",2,start,stop) end for unicode=start,stop do local index=readushort(f) @@ -11741,8 +11749,8 @@ formatreaders[12]=function(f,fontdata,offset) local first=readulong(f) local last=readulong(f) local index=readulong(f) - if trace_cmap_detail then - report("format 12 from %C to %C starts at index %i",first,last,index) + if trace_cmap_details then + report_cmap("format 12 from %C to %C starts at index %i",first,last,index) end for unicode=first,last do local glyph=glyphs[index] @@ -11780,8 +11788,8 @@ formatreaders[13]=function(f,fontdata,offset) local last=readulong(f) local index=readulong(f) if first