What are the rules for typesetting superscript, subscript and fractions (as in a/b but with an horizontal fraction bar)?
I am centring the subscript on the baseline, the superscript on the cap height and the fraction bar on the x height. Latex appears to be doing that as well.
What I haven't figured out is how to position the numerators and denominators relative to the fraction bar. I know the bounding box of the numerator and denominator, but how much spacing should there be with the fraction bar?
I can access all the regular metrics of the font (ascender, descender, leading, cap-height, x-height).
Edit: (based on appendix g) As far as I can tell, the distance between the fraction bar and the numerator/denominator box is three times the fraction bar thickness.
It seems to me that this would not produce a symmetrical output if the font descent value is different from the ascent value minus the cap height value. I mean the apparent distance between the fraction bar and the bottom of the numerator text, and, the distance between the fraction bar and the top of the denominator text.
Visually either the numerator or denominator would appear further away from the fraction bar even if both contain the same text.