Hi Graham,

···<date: 2016-07-19, Tuesday>···<from: Graham Douglas>···

> I'm just starting to explore LuaTeX's OpenType math typesetting
> capabilities and would like to adjust some of the OpenType parameter
> values to fine-tune some spacing. Just out of curiosity I wrote a tiny
> aux library function so that I can explore the values (details below if
> anyone interested).
> 
> My question is, what is the safest or "official" way via luaotfload to
> make adjustments to OpenType math parameters which will minimize risk of
> breaking something?

as you already discovered in the other mail, the “patch_font”
callback is the way to go.

> --- aux function
> local get_identifiers = function ()
>   return identifiers
> end

That’s the table of fonts registered by the fontloader. With
Luaotfload the canonical way of accessing this table is via the
font.getfont() interface.

> In the TeX document, then loop over "identifiers" to dump out the values
> of the mathparameters and MathConstants tables

For printing values it’s much easier to just use the built-in
serialization:

    \input luaotfload.sty
    \directlua {
      luatexbase.add_to_callback ("luaotfload.patch_font",
                                  function (fontdata) inspect 
(fontdata.MathConstants) end,
                                  "dumper")
    }
    \font \mainfont = file:cambria.ttc(1)
    \mainfont foo \bye

Fwiw the “patch_font” callback is mentioned briefly in the
manual, ch. 9.1.

Best,
Philipp

Attachment: pgpwqjUby_shm.pgp
Description: PGP signature

Reply via email to