[luatex] Querying Script and ScriptScriptPercentScaleDown math constants
taco
taco at elvenkind.com
Tue Jul 13 20:02:23 CEST 2010
Khaled Hosny wrote:
> Is there a way to the values of ScriptPercentScaleDown and
> ScriptScriptPercentScaleDown either from tex or from lua, other than
> reading the MathConstants table directly?
Not reliably, because LuaTeX itself does not actually use
these parameters.
You can get them directly from font.fonts[] if you know
the right font id, but even then there is no guarantee
that they contain the right values as no checks are done
(and for example, in context mkiv, they are scaled
to the font's load size, just like the other math parameters).
Anyway, here is an iterative loop to demonstrate what
is available:
for i=1,100 do
if font.fonts[i]
and font.fonts[i].MathConstants
and font.fonts[i].MathConstants.ScriptPercentScaleDown then
texio.write_nl('Font '..i..':')
texio.write_nl('Script='..font.fonts[i].MathConstants.ScriptPercentScaleDown)
texio.write_nl('ScriptScript='..font.fonts[i].MathConstants.ScriptScriptPercentScaleDown)
end
end;
Best wishes,
Taco
> Regards,
> Khaled
>
More information about the luatex
mailing list