Figures: slashed zero
Add a slashed zero to your font with this quick Glyphs tip.
For clarity’s sake, it is a good idea to add a slashed variation of your zero to your digits. This allows users to change the shape of their zeros by activating an OpenType feature, and minimizing potential confusion with the lowercase letter o.
All it takes is a copy of the
zero with a
.zero suffix at the end of the glyph name. Then, Glyphs can build the
zero OpenType feature automatically for you when you press the Refresh button in File > Font Info > Features:
Hint: Want to know more about the
zerofeature? Read the specification in Microsoft’s OpenType Layout Tag Registry. Note: the spec says it would not apply to old-style figures. We disagree about this.
A quick way to create slashed zeros, is to make a compound copy of your zeros. You can do so by choosing Glyph > Add Glyphs and entering whatever is appropriate of the following lines:
zero=zero.zero zero.lf=zero.lf.zero zero.tf=zero.tf.zero zero.osf=zero.osf.zero zero.tosf=zero.tosf.zero zero.sc=zero.sc.zero
One note about multiple dot suffixes: The order of dot suffixes (
.zero last) in the glyph names assumes that the
zero feature will be ordered after the other numeral features (
tnum) and smallcap features (
c2sc), which is the recommended default order created by the built-in feature generator. If, for whatever reason, you need to reorder your features, but keep the automatic feature generation, you may want to consider changing the order of suffixes. It is easy to change the names of selected glyphs with Edit > Find > Find and Replace (Cmd-Shift-F).
Now, draw your zero slash and make it a component. Do so by selecting your slash with Cmd-A and right-click to open the context menu.
Select Component From Selection and name your slash, e.g.,
_slash.zero. A preceding underscore creates the glyph as not-exporting right away. Or, disable the Export in the context menu after you created the slash. Since the slashes should only appear inside the respective slashed zeros, it would not make sense for them to appear as separate glyphs in the exported font. And of course, consider different slashes for different zeros, and name them appropriately, e.g.,
slash.lf.zero for a slash fitting into lining figures.
And then, go into each of the
.zero glyphs, and add a slash above the component, by right-clicking to open the context menu, and selecting Add Component.
In the dialog that pops up, search for your zero slash and press Select:
All we need to do now, is define the exact position where the zero and the slash connect. You do this by adding correlating anchors to your zero and your slash. Anchors serve as position markers that tell Glyphs where the components are going to be linked with each other.
So, add an anchor in each of your zero by selecting Add Anchor from the context menu. Give the anchor a sensible name, e.g.,
slash. Drag it to where you want your slash to link to, for example in the center of your zero.
Hint: To center the anchor horizontally between two path nodes, select the anchor, Shift-select the two nodes, and choose Paths > Align Selection (Cmd-Shift-A). The nodes will remain where they are, but the anchor moves to the horizontal center between them.
Now, add a counterpart anchor to your slash. This anchor should have the same name as the anchor in your zero, except for an underscore at the beginning. This way, the two anchors are linked. I.e., in our case, the appropriate anchor name is
_slash. Adjust the position of the anchor, and you’re done:
From left to right: the
zero, and the
zero.zero. Yay, slashed zero!
SAMPLE FONT: MARTHA, COURTESY OF LISA SCHULTZ.
Update 2017-02-23: added link to OT Tag Registry, hints about suffix order, underscore glyph naming and centering anchors. Updated some screenshots. Small text improvements. Added related articles.
Update 2019-11-18: corrected typo.
Update 2020-03-25: prefixed title with ‘Figures’.
Update 2022-07-29: updated title.