diff options
-rw-r--r-- | luaotfload.dtx | 7 | ||||
-rw-r--r-- | tests/font_patch.tex | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/luaotfload.dtx b/luaotfload.dtx index 9aeb0ee..832aadf 100644 --- a/luaotfload.dtx +++ b/luaotfload.dtx @@ -648,18 +648,19 @@ local function def_font(...) % \begin{macrocode} local otfdata = fontdata.shared.rawdata if otfdata.metadata.math then + local params = fontdata.parameters local mc = { } for k,v in next, otfdata.metadata.math do if k:find("Percent") then -- keep percent values as is mc[k] = v else - mc[k] = v / fontdata.units * fontdata.size + mc[k] = v / params.units * params.size end end -- for \overwithdelims - mc.FractionDelimiterSize = 1.01 * fontdata.size - mc.FractionDelimiterDisplayStyleSize = 2.39 * fontdata.size + mc.FractionDelimiterSize = 1.01 * params.size + mc.FractionDelimiterDisplayStyleSize = 2.39 * params.size fontdata.MathConstants = mc end diff --git a/tests/font_patch.tex b/tests/font_patch.tex index e096551..d41ff48 100644 --- a/tests/font_patch.tex +++ b/tests/font_patch.tex @@ -2,8 +2,8 @@ \directlua { local function patch(fontdata) local mc = fontdata.MathConstants - local em = fontdata.units - local sz = fontdata.size + local em = fontdata.parameters.units + local sz = fontdata.parameters.size if fontdata.psname == "CambriaMath" and mc then mc.DisplayOperatorMinHeight = 2800 / em * sz end |