From 25fc028ca9e811187704cf2de2ba0d0bb9846b67 Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Thu, 9 Apr 2015 21:15:05 +0200 Subject: 2015-04-09 20:58:00 --- tex/generic/context/luatex/luatex-fonts-merged.lua | 44 ++++++++++++++++------ 1 file changed, 33 insertions(+), 11 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 56687d5db..9c2f4732b 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/08/15 21:31:36 +-- merge date : 04/09/15 20:56:25 do -- begin closure to overcome local limits and interference @@ -4393,7 +4393,8 @@ function constructors.scale(tfmdata,specification) local stackmath=not properties.nostackmath local nonames=properties.noglyphnames local haskerns=properties.haskerns or properties.mode=="base" - local hasligatures=properties.hasligatures or properties.mode=="base" + local hasligatures=properties.hasligatures or properties.mode=="base" + local realdimensions=properties.realdimensions if changed and not next(changed) then changed=false end @@ -4474,6 +4475,26 @@ function constructors.scale(tfmdata,specification) local width=description.width local height=description.height local depth=description.depth + if realdimensions then + if not height or height==0 then + local bb=description.boundingbox + local ht=bb[4] + if ht~=0 then + height=ht + end + if not depth or depth==0 then + local dp=-bb[2] + if dp~=0 then + depth=dp + end + end + elseif not depth or depth==0 then + local dp=-description.boundingbox[2] + if dp~=0 then + depth=dp + end + end + end if width then width=hdelta*width else width=scaledwidth end if height then height=vdelta*height else height=scaledheight end if depth and depth~=0 then @@ -7609,15 +7630,16 @@ actions["add dimensions"]=function(data,filename) report_otf("mark %a with width %b found in %a",d.name or "",wd,basename) end if bb then - local ht,dp=bb[4],-bb[2] - if ht==0 or ht<0 then - else - d.height=ht - end - if dp==0 or dp<0 then - else - d.depth=dp - end + local ht=bb[4] + local dp=-bb[2] + if ht==0 or ht<0 then + else + d.height=ht + end + if dp==0 or dp<0 then + else + d.depth=dp + end end end end -- cgit v1.2.3