Math symbols placement

Hi everybody!
I was wondering to hear any thoughts on aligning math symbols to the middle of figure vs x-height, what makes more sense? Or other solutions like in-between positioning or contextual alternatives? Of course, math symbols are mostly meant for figures, but they are used with lowercase letters too. Any thoughts?

Comments

  • John Hudson
    John Hudson Posts: 3,167
    This depends on the typeface and the intended purpose. Most fonts support only a set of basic arithmetic symbols, and these are most often used in context of regular text including short arithmetic strings. More complex mathematical typesetting requires special fonts and layout handling.

    The convention in most fonts is for the math symbols to be aligned to the lowercase letters, typically with the + sign vertically extending or nearly extending from baseline to x-height.

    In mathematical fonts, the symbols may be both larger and higher, although the bottom of the + sign will still be somewhere close to the baseline.

    The other question often asked about math symbols is whether they should be slanted in italic fonts. My preference is always no, but some designers do this, and the argument can be made that it is appropriate for some uses, e.g. in packaging design, where consistency of visual style overrides norms. In mathematical typesetting, arithmetical and other non-alphanumeric symbols are never italicised.

    Spacing of upright math symbols relative to italic numerals can be tricky. They often need to be shifted slightly to the right to sit visually centred between the numerals, but the amount they need to be shifted can vary slightly depending on the symbol.
  • Craig Eliason
    Craig Eliason Posts: 1,435
    Is there any thought to considering the height of the hyphen here—not only as a glyph that will also need to relate to similar neighbors, but also because practically speaking it will be used frequently in the place of the /minus character?

    Also, is anyone making variants of math symbols for OpenType figure alternatives (proportional, oldstyle, etc.)? I can see an argument for a higher "lining plus-sign" than "oldstyle plus-sign," even conceding the point above that it's not always figures that are added. (I've certainly made oldstyle/lining distinctions in currency symbols and /percent, but I don't think I've ever done it with math operators.)
  • John Savard
    John Savard Posts: 1,126
    edited April 2020
    If one is intending one's typeface to actually be used in the setting of mathematics, there is no substitute for looking at typefaces which are actually designed for that purpose, such as Computer Modern and AMS Euler.
    Available on the Internet are two articles by Daniel Rhatigan, "The Monotype 4-line system for setting mathematics", and "Three typefaces for mathematics", which will be helpful. If you can get your hands on a copy of "The Printing of Mathematics" by Chaundy et. al., that would be even more helpful.
    When John Hudson mentioned italics, this brought one important point to my mind.
    If 2+2=4 looks all right normally, if all the characters are slanted by the same transformation, the + sign should be centered so that it is properly spaced with respect to the digits, and so it was not clear to me that the concern he specifically raised is an issue.
    But in mathematical typography, usually upright digits and operator symbols are used with italic lower-case letters denoting quantities. So the center line of the + should be taken as locating where (rather than at the baseline) upright and italic characters are to be in the same position, so that a formula like 2x+3y will look right.
    Here are three examples taken from mathematical textbooks of the 19th Century:

    Of course, they're not necessarily very good examples; as at that time, mathematical typesetting was often done with whatever types were available, rather than types especially designed to be suitable for that purpose. They just happened to be easily available and in the public domain.
    In the first example, the + sign is clearly aligned with the middle of the lower-case character; in the second, the - sign (in m - 1) seems to be in somewhat of an in-between position, but favoring the lower-case letter, and in the third example, the + signs seem to be aligned with the middle of the digit.
    I suspect that in more recent practiice, aligning with the middle of the digit is what won out, even though it would seem to me that an in-between position would look better. However, looking at one of the articles by Daniel Rhatigan I mentioned above, the examples he showed had the alignment with the lower-case letters, so my memory coud be faulty.

    And here are two more examples, this time from 1908 and 1916 - the first from a scientific journal, the second from a major publisher of advanced textbooks in science and engineering. So this time one can be confident these are reputable examples, and here the centers of the operators are definitely aligned with the lower-case letters.
  • My pragmatic receipe is to a) align most of the operational signs centered vertically; and b) adjust the + to stand right on the baseline. Additionally, to keep things simple, I adjust the centered math ch.s to the main stroke ch.s, such as hyphen and dashes/minus (endash being the same glyph as minus, normally). That is for general-purpose fonts though, not for specialized math usage.
    The above is valid for average tabular/big figure relations. I have never bothered with alterations of this geometry in terms of medieval figures, I don’t think it is worth the trouble, normally. However, never say never, I would do this eventually but only if there is a special and very strong use case demanding such a treatment.

  • Nick Shinn
    Nick Shinn Posts: 2,200
    edited April 2020
    I almost always make the minus and en dash identical, due to the lack of a proper minus sign on the standard keyboard, and, as Craig says, I align the hyphen too, although that is of course thicker.
    This means the math symbols end up vertically aligned with the x-height, not the lining-figure/cap height.

    I don’t even centre-align “all caps” marks, but keep them a little lower. For some reason, centre-alignment just doesn’t look right to me, in all-cap settings.

    I like the way the centre-line of math symbols centres on old style figures, especially the zero.

    I slant the italic math symbols, unless I am feeling particularly lazy.
  • Alex Visi
    Alex Visi Posts: 185
    Thanks everybody! Yes, I was asking about general purpose fonts.

    Is there any thought to considering the height of the hyphen here—not only as a glyph that will also need to relate to similar neighbors, but also because practically speaking it will be used frequently in the place of the /minus character?

    But the hyphen is being used as the hyphen more often anyway, so is butchering it worth it?
  • Craig Eliason
    Craig Eliason Posts: 1,435
    Alex Visi said:
    But the hyphen is being used as the hyphen more often anyway, so is butchering it worth it?
    I meant the reverse: having set up the height of the hyphen based on its own needs, using that as guidance for the math symbols. 
  • John Hudson
    John Hudson Posts: 3,167
    I love ‘Scotch’ numerals. They’re especially useful in fonts supporting both European and Indian scripts, because they can align adequately with both.
  • Chris Lozos
    Chris Lozos Posts: 1,458
    I usually include 2 entire sets of figures and math operators.  The default is centered on the cap height zero and the second [a bit smaller] and centered on SMCP. The {case} feature controls which set is used.
  • Craig Eliason
    Craig Eliason Posts: 1,435
    Do you mean {c2sc}?