summaryrefslogtreecommitdiff
path: root/luaotfload.dtx
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2010-10-25 12:05:00 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2010-10-25 12:05:00 +0200
commit4bdf4d098608d6121b4a735c9430c0519190437d (patch)
tree188172ec4ec6fa1bc89e241c7abc22958e7190ad /luaotfload.dtx
parent854310ce176fe514db7262ec23bd98769f0676cb (diff)
downloadluaotfload-4bdf4d098608d6121b4a735c9430c0519190437d.tar.gz
Set \fontdimen10|11 for math fonts
This gives macro packages access to (Script)ScriptPercentScaleDown math constants, see wspr/unicode-math#112.
Diffstat (limited to 'luaotfload.dtx')
-rw-r--r--luaotfload.dtx17
1 files changed, 17 insertions, 0 deletions
diff --git a/luaotfload.dtx b/luaotfload.dtx
index 6c3dafd..0cb371e 100644
--- a/luaotfload.dtx
+++ b/luaotfload.dtx
@@ -678,6 +678,23 @@ local function def_font(...)
mc["FractionDelimiterDisplayStyleSize"] = 2.39 * size
fontdata.MathConstants = mc
+% \end{macrocode}
+%
+% \LuaTeX\ does not provide interface to accessing
+% \texttt{(Script)ScriptPercentScaleDown} math constants, so we emulate
+% \XeTeX\ behaviour by setting \cs{fontdimen10} and \cs{fontdimen11}.
+%
+% \begin{macrocode}
+ if mc["ScriptPercentScaleDown"] then
+ fontdata.parameters[10] = mc["ScriptPercentScaleDown"]
+ else -- resort to plain TeX default
+ fontdata.parameters[10] = 70
+ end
+ if mc["ScriptScriptPercentScaleDown"] then
+ fontdata.parameters[11] = mc["ScriptScriptPercentScaleDown"]
+ else -- resort to plain TeX default
+ fontdata.parameters[11] = 50
+ end
end
end