From 58c7c9288160407c874930aac789ef6ef3faa6b5 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 10 Sep 2019 21:16:35 +0200 Subject: 2019-09-10 20:11:00 --- tex/generic/context/luatex/luatex-fonts-merged.lua | 28 +++++++++++++--------- 1 file changed, 17 insertions(+), 11 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 e3a709a92..47bfe470f 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 : 09/09/19 13:44:26 +-- merge date : 09/10/19 20:03:16 do -- begin closure to overcome local limits and interference @@ -32100,10 +32100,12 @@ if not modules then modules={} end modules ['font-ocl']={ } local tostring,tonumber,next=tostring,tonumber,next local round,max=math.round,math.round -local sortedkeys,sortedhash=table.sortedkeys,table.sortedhash +local gsub,find=string.gsub,string.find +local sortedkeys,sortedhash,concat=table.sortedkeys,table.sortedhash,table.concat local setmetatableindex=table.setmetatableindex local formatters=string.formatters local tounicode=fonts.mappings.tounicode +local bpfactor=number.dimenfactors.bp local helpers=fonts.helpers local charcommand=helpers.commands.char local rightcommand=helpers.commands.right @@ -32292,8 +32294,8 @@ local function pdftovirtual(tfmdata,pdfshapes,kind) local dy=nil if typ=="table" then data=pdf.data - dx=pdf.dx or 0 - dy=pdf.dy or 0 + dx=pdf.x or pdf.dx or 0 + dy=pdf.y or pdf.dy or 0 elseif typ=="string" then data=pdf dx=0 @@ -32306,8 +32308,8 @@ local function pdftovirtual(tfmdata,pdfshapes,kind) local dp=character.depth or 0 character.commands={ not unicode and actualb or { "pdf","page",(getactualtext(unicode)) }, - downcommand[dp+dy*hfactor], - rightcommand[dx*hfactor], + downcommand [dp+dy*hfactor], + rightcommand[ dx*hfactor], vfimage(wd,ht,dp,data,name), actuale, } @@ -32342,18 +32344,20 @@ do name="otfsvg", program="inkscape", method="pipeto", - template="--shell > temp-otf-svg-shape.log", + template="--export-area-drawing --shell > temp-otf-svg-shape.log", reporter=report_svg, } if not runner then runner=function() - return io.open("inkscape --shell > temp-otf-svg-shape.log","w") + return io.open("inkscape --export-area-drawing --shell > temp-otf-svg-shape.log","w") end end - function otfsvg.topdf(svgshapes) + function otfsvg.topdf(svgshapes,tfmdata) local pdfshapes={} local inkscape=runner() if inkscape then + local indices=fonts.getindices(tfmdata) + local descriptions=tfmdata.descriptions local nofshapes=#svgshapes local f_svgfile=formatters["temp-otf-svg-shape-%i.svg"] local f_pdffile=formatters["temp-otf-svg-shape-%i.pdf"] @@ -32385,7 +32389,9 @@ do for index in next,pdfshapes do local svgfile=f_svgfile(index) local pdffile=f_pdffile(index) - pdfshapes[index]=loaddata(pdffile) + pdfshapes[index]={ + data=loaddata(pdffile), + } remove(svgfile) remove(pdffile) end @@ -32410,7 +32416,7 @@ local function initializesvg(tfmdata,kind,value) if not pdfshapes or pdffile.timestamp~=timestamp then local svgfile=containers.read(otf.svgcache,hash) local svgshapes=svgfile and svgfile.svgshapes - pdfshapes=svgshapes and otfsvg.topdf(svgshapes) or {} + pdfshapes=svgshapes and otfsvg.topdf(svgshapes,tfmdata) or {} containers.write(otf.pdfcache,hash,{ pdfshapes=pdfshapes, timestamp=timestamp, -- cgit v1.2.3