Glyphtext and webinar apology
After we published the recording of our first webinar, David Vereschagin contacted us with the following comment:
Jimmy Gallagher commits a serious Fontlab error when attempting to demonstrate letterspacing and setting sidebearings in his “Beyond the Basics: Font Editing Tips and Techniques” webinar. (This starts at about the 50 minute mark in the recording.) He fails to remember that putting /H into the metrics window in Fontlab will not yield a display of a slash and an H, but simply an H itself. When he inputs H/H/H he thinks he is showing how his spacing system works, but is only showing a series of Hs. Worse, when trying to show the letterspacing of HOH he claims that the sidebearings on O are the source of the letterspacing problem, when it’s clearly the left sidebearing of the H that is off. Everyone who attended that webinar or purchased the recording is owed an apology and a correction.
Thanks! I certainly do apologize for the confusion. Using the slash glyph as a “spacer glyph” was possible in Fontographer 5.0 and earlier, but you won’t get away with that so easily in FontLab Studio or the newest Fontographer 5.2. Rushing to finish and trying to toggle between FontLab Studio and Fontographer tripped me up. Thanks so much for catching this — we can always use comments like this so that we can do better next time!
And here’s what happened in more detail…
In the Metrics Window of FontLab Studio, Fontographer 5.2 or TypeTool, you can enter a string of glyphs to preview and set the metrics/kerning for by typing into a small text box. If you enter H/H/H there, what you’ll effectively see is three consecutive H glyphs, with the slashes “eaten up”. This was not so in Fontographer 5.0 and earlier. What’s going on there?
Well, in that textbox, you’re not typing regular text. You’re typing what we call glyphtext, which is a way to enter a string of any glyphs regardless of whether they have Unicodes assigned or not. In glyphtext, you can enter glyphs in several different ways:
- You can type any encoded (Unicode) character directly, such as & or Ą or H.
- You can type any Unicode codepoint as hexadecimal number if you escape (prefix) it with \u, e.g. \u005E or \u0048. This is effectively equivalent to the above, it’s just that some non-Western characters are difficult to type in directly if you don’t have the right keyboard layout installed on your system. So it’s a shortcut/alternate method.
- You can type any glyph name if you escape it with the slash, e.g. /ampersand or /Aogonek or /H. In particular, this convention allows you to enter unencoded glyphs such as /h.smcp or /two.onum for the OpenType alternate glyphs.
If you use method #2 or #3, and a normal (direct) character follows an escaped entry, you need to add a space. If another escaped entry follows, there is no space.
Which means that typing one thing gets you another, specifically:
HH&H gets you HH&H
HH/ampersand H gets you HH&H
/H H&H gets you HH&H
/H/H/ampersand\u0048 gets you HH&H
So in glyphtext, the characters / and \ are treated specially. Normally, they are used as escape characters, so in order to actually type these characters, you need to use // to get / and to use \\ to get \. Of course you can use /slash instead of // as well.
In Fontographer, glyphtext is a new thing. Before FOG 5.2, many designers used the / (slash) glyph as a separator to visualize spacing. So if you typed H/H/H, you’d get H/H/H, or more specifically, the sequence of glyphs H slash H slash H. But in FOG 5.2, FLS and TypeTool, if we type H/H/H, then the slash won’t show up at all, because we’re not actually entering the slash glyph. We effectively enter three Hs: one using the direct character entry (H) and two using the escaped glyph name (/H). This is equivalent to the situation where, in order to type in three zeros, we could enter 000 or 0/zero/zero.
To actually use the slash as a spacer glyph, we’d need to type in H//H//H, which results in the glyph series H slash H slash H appearing.
Please note that in FLS, glyphtext only works in the small text box where you enter the text. If you switch FLS Metrics Window to the Text Mode (1st icon out of four), and type directly in the big window, then you can only enter regular text, not glyphtext (i.e. without the escapement methods #2 and #3).
So we actually recommend to no longer use the slash as a spacer but to use | (Shift+\ on the keyboard). Then you don’t need to worry about the escapement. Some designers who use | as a spacer glyph sometimes draw a very very thin vertical rectangle (or in case of italic fonts, actually a thin rectangle that is slanted in the appropriate angle) and space the font using that.
So, once again, many thanks to David for catching that mistake!
Trackback from your site.