diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2016-06-15 00:02:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-15 00:02:42 +0200 |
commit | 36cc5c9c567e24916f254203fc362bf124e26d02 (patch) | |
tree | 56cdd0a401ffbb99e8702f47a7865677b0971a8e /src/luaotfload-auxiliary.lua | |
parent | 17fbf1d1c26047f1e0e80fc6e5f3331f6183a795 (diff) | |
parent | ba744a4bce3ed03eefbf2b4746fa24e6d388d9ff (diff) | |
download | luaotfload-36cc5c9c567e24916f254203fc362bf124e26d02.tar.gz |
Merge pull request #364 from phi-gamma/master
fixes, 3rd edition
Diffstat (limited to 'src/luaotfload-auxiliary.lua')
-rw-r--r-- | src/luaotfload-auxiliary.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/luaotfload-auxiliary.lua b/src/luaotfload-auxiliary.lua index e482aba..3c43eb9 100644 --- a/src/luaotfload-auxiliary.lua +++ b/src/luaotfload-auxiliary.lua @@ -212,15 +212,19 @@ end local query_ascender = function (fontdata) local parameters = fontdata.parameters if not parameters then return false end + local ascender = parameters.ascender + if ascender then + return ascender --- pre-scaled + end + local shared = fontdata.shared if not shared then return false end local rawdata = shared.rawdata if not rawdata then return false end local metadata = rawdata.metadata if not metadata then return false end - local ascender = parameters.ascender - or metadata.ascender if not ascender then return false end + ascender = metadata.ascender if not ascender then return false end local size = parameters.size if not size then return false end local units = lookup_units (fontdata) if not units or units == 0 then return false end - return ascender * size / units + return ascender * size / units --- scaled end local query_capheight = function (fontdata) |