diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2015-06-13 00:40:45 +0200 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2015-06-13 00:40:45 +0200 |
commit | 90f398e1c9d2896b2d30d0b66f9c8a88255511a8 (patch) | |
tree | 88459ad0c6986a6648c969726081248cd5c8d74e /src/fontloader/misc/fontloader-font-con.lua | |
parent | c4c4901173b0f4284534db1b6a3cfe865b05e15c (diff) | |
parent | b271e253b40cd0af97f6d50f0461f87ad1ed5314 (diff) | |
download | luaotfload-90f398e1c9d2896b2d30d0b66f9c8a88255511a8.tar.gz |
Merge pull request #274 from phi-gamma/master
pull in current state of affairs
Diffstat (limited to 'src/fontloader/misc/fontloader-font-con.lua')
-rw-r--r-- | src/fontloader/misc/fontloader-font-con.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/fontloader/misc/fontloader-font-con.lua b/src/fontloader/misc/fontloader-font-con.lua index bb96912..72fbb5c 100644 --- a/src/fontloader/misc/fontloader-font-con.lua +++ b/src/fontloader/misc/fontloader-font-con.lua @@ -507,6 +507,7 @@ function constructors.scale(tfmdata,specification) local nonames = properties.noglyphnames local haskerns = properties.haskerns or properties.mode == "base" -- we can have afm in node mode local hasligatures = properties.hasligatures or properties.mode == "base" -- we can have afm in node mode + local realdimensions = properties.realdimensions -- if changed and not next(changed) then changed = false @@ -618,6 +619,27 @@ function constructors.scale(tfmdata,specification) local width = description.width local height = description.height local depth = description.depth + if realdimensions then + -- this is mostly for checking issues + 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 then depth = vdelta*depth else depth = scaleddepth end |