I assume you already have fractions. We will re-use them for the superscript and subscript figures.
Superscript: the sups feature
Imagine m squared for square meter, imagine x to the third power. This is the height the superscript figures ought to have. Depending on your design, exact copies of the numerators may do. Many designs need them shifted a little higher, though:
So, how do we do that? Bring up your numerators: Go to the Font tab and search for the
.numr suffix. Select them and duplicate them with Glyph > Duplicate, and you will receive glyphs called
one.numr.001 and so on. With Edit > Find > Find and Replace, replace
superior (without a period). If you do want to shift them up, you can push them all up in one go with Filter > Transformations > Transform. In File > Font Info > Features, push the Refresh button, and Glyphs will generate the
sups (superscript) feature.
Please note that with this method, the superior glyphs will receive separate Unicode values. Thus, the feature will mess with the characters. If you want to avoid that, use the
.sups suffix. Glyphs with dot suffixes do not get Unicode values.
Subscript: subs vs. sinf
What? Two different OpenType features for subscripts? In the official wording,
subs (subscript) is for:
The ‘subs’ feature may replace a default glyph with a subscript glyph, or it may combine a glyph substitution with positioning adjustments for proper placement. […] Note: This is a change of semantic value. Besides the original character codes, the application should store the code for the new character.
The point is that
subs can trigger a ‘change of semantic value’, i.e. fiddle around on the character level. Theoretically, OpenType features are not supposed to do that, but in this case, Unicode already had subscript figures encoded, so we might as well re-use them for the feature.
sinf (scientific inferiors) is intended for scientific use:
Replaces lining or oldstyle figures with inferior figures (smaller glyphs which sit lower than the standard baseline, primarily for chemical or mathematical notation). May also replace lowercase characters with alphabetic inferiors.
So, when the chemical formulae for carbon-dioxide and water need inferior twos, this is a job for
It is totally legit that you want your
subs figures to be identical to your
sinf figures. You can achieve that if you employ the
.subs suffix. Glyphs will then generate both the
subs and the
sinf feature with them. In that case, we can make compound copies of the numerators and, if necessary, push them down with the Transformations filter. But first, paste this in the dialog that appears after you call Glyph > Add Glyphs…:
zero.numr=zero.subs one.numr=one.subs two.numr=two.subs three.numr=three.subs four.numr=four.subs five.numr=five.subs six.numr=six.subs seven.numr=seven.subs eight.numr=eight.subs nine.numr=nine.subs
If you do want to differentiate between
sinf, then use the
inferior suffix (without a period) for
subs, so it can apply its semantic changes alright. Likewise, you can use the
.sinf suffix for the
sinf feature. To get the party started, here is the glyph recipe for Glyph > Add Glyphs…:
zero.numr=zero.sinf one.numr=one.sinf two.numr=two.sinf three.numr=three.sinf four.numr=four.sinf five.numr=five.sinf six.numr=six.sinf seven.numr=seven.sinf eight.numr=eight.sinf nine.numr=nine.sinf zero.numr=zeroinferior one.numr=oneinferior two.numr=twoinferior three.numr=threeinferior four.numr=fourinferior five.numr=fiveinferior six.numr=sixinferior seven.numr=seveninferior eight.numr=eightinferior nine.numr=nineinferior
Again, Filter > Transformations > Transform will help you move the figures into the right position.
SAMPLE FONT: MARTHA, COURTESY OF LISA SCHULTZ.