3

I'm developing an equation renderer, using the Win32 API and the MATH table. I understood most of constants defined in MATH table expect several one. Since Microsoft get most of ideas from TeX, I think this is the best place to ask about. It will be great if someone could help me understand the meaning of the following constants:

How do LuaTeX or XeTeX use the following entries of the MATH table when setting math using OpenType math fonts?

MathLeading White space to be left between math formulas to ensure proper line spacing.

DelimitedSubFormulaMinHeight Minimum height required for a delimited expression to be treated as a sub-formula. Suggested value: normal line height ×1.5.

AccentBaseHeight Maximum (ink) height of accent base that does not require raising the accents. Suggested: x height of the font (os2.sxHeight) plus any possible overshots.

FlattenedAccentBaseHeight Maximum (ink) height of accent base that does not require flattening the accents. Suggested: cap height of the font (os2.sCapHeight).

Also I do not find any constants in MATH table that define a horizontal/vertical gaps in a matrix environment, are these spaces controlled by font table entries when set by luatex or xetex?

6
  • What don't you understand? This seems off-topic to me, but the explanations seem pretty self-explanatory. I can't imagine what MathLeading is for, but even that seems clear enough in principle. I just don't know what it means by between math fomulas (sic). Why would anything in the MATH table affect spacing when not in maths mode? (And if you are still in maths mode, in what sense are you between?)
    – cfr
    Jan 17, 2017 at 2:58
  • Most of all yes. But what is the "flattening the accents" for example? Jan 17, 2017 at 4:37
  • 1
    This posting would appear to belong on some Microsoft-related tech site. I fail to see the connection of this posting to TeX.SE.
    – Mico
    Jan 17, 2017 at 4:48
  • 1
    @Mico it's not (now) a microsoft spec but part of OpenType. The question could easily be re-worded to be more on topic here by phrasing it as "how do luatex and xetex interpret AccentBaseHeight?" rather than "what is the meaning of AccentBaseHeight? But the question is essentially the same however you word it. Jan 17, 2017 at 8:57
  • 1
    @Mico done :-).. Jan 17, 2017 at 9:02

1 Answer 1

4

Flattened accents refers to the practice of using less steep accents on capitals (as is done in TS1 encoding for example which has \DeclareTextAccent{\capitalgrave}{TS1}{0} for a grave accent designed for capital letters). Ulrik Vieth in his nice but now a bit outdated MAPS paper says

In addition to that, OpenType has introduced another mechanism to replace accents by flattened accents if the size of the base glyph exceeds a certain size, which is most likely related to the height of capital letters. At the time of writing, support for flattened accents has not yet been implemented in the new TeX engines, but it is being considered for LuaTeX version 0.40.

Looking in the development sources of luatex (mlist.w) I see

FlattenedAccentBaseHeight:
  This is based on the 'flac' GSUB feature. It would not be hard
  to support that, but proper math accent placements cf. MATH
  needs support for MathTopAccentAttachment table to be
  implemented first

So I assume that this is not actually used anywhere. (although the fontloader will make the information available to Lua if the font has these entries)

the same mlist.w documents MathLeading as

MathLeading:
  LuaTeX does not currently handle multi-line displays, and
  the parameter does not seem to make much sense elsewhere

and DelimitedSubFormulaMinHeight as

DelimitedSubFormulaMinHeight:
  This is perhaps related to word's natural math input? I have
  no idea what to do about it

The remaining one, AccentBaseheight is, the "natural" height for which accents in the font are designed. A base character of this height can simply be over-printed with the accent, taller characters require the typesetting engine to raise the accent. As Ulrik comments in the paper referenced above this is effectively a generalisation of TeX's accent positioning logic which assumes that by default the accent can be positioned over a base of height x-height (fontdimen 5) of the font.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .