From 73521a6f3d35b8cf0e4cfc5d57f32ee5b7d4d6d3 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 26 Apr 2016 08:15:07 +0200 Subject: [aux] actually pull capheight and ascender values from the correct table --- src/luaotfload-auxiliary.lua | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/luaotfload-auxiliary.lua b/src/luaotfload-auxiliary.lua index 06821f6..d6835a9 100644 --- a/src/luaotfload-auxiliary.lua +++ b/src/luaotfload-auxiliary.lua @@ -209,19 +209,24 @@ end local query_ascender = function (fontdata) local parameters = fontdata.parameters if not parameters then return false end - local metadata = fontdata.metadata if not metadata then return false end - local ascender = metadata.ascender if not ascender then return false 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 local units = metadata.units if units == 0 then return false end local size = parameters.size if not size then return false end return ascender * size / units end local query_capheight = function (fontdata) - local parameters = fontdata.parameters if not parameters then return false end - local metadata = fontdata.metadata if not metadata then return false end - local capheight = metadata.capheight if not capheight then return false end - local units = metadata.units if units == 0 then return false end - local size = parameters.size if not size then return false end + local parameters = fontdata.parameters if not parameters then return false 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 capheight = metadata.capheight if not capheight then return false end + local units = metadata.units if units == 0 then return false end + local size = parameters.size if not size then return false end return capheight * size / units end -- cgit v1.2.3