latex3 / unicode-math

XeLaTeX/LuaLaTeX package for using unicode/OpenType maths fonts
http://ctan.org/pkg/unicode-math
LaTeX Project Public License v1.3c
243 stars 28 forks source link

Luatex: use scriptstyle sizes from the otf file if available #401

Closed d1saster closed 7 years ago

d1saster commented 7 years ago

So far only in XeTeX the otf-file parameters ScriptPercentScaleDown and ScriptScriptPercentScaleDown were honored by the loading routines. This commit patches \@@_declare_math_sizes in order to get the same behavior for luatex.

wspr commented 7 years ago

Thanks — I wonder if this behaviour changed at some point. I thought all the extended fontdimens were set in the same way in both engines, but apparently not.

I haven't completely decided whether it would be "cleaner" in the LuaTeX code to just set the fontdimens manually when the font is loaded so there's a conditional loading section and then no branch. OTOH maybe the indirection is a bit messy in the long term and the approach you've taken here is easier to maintain if there's ever more of a split between the XeTeX and LuaTeX code.