Diacritics

Tutorial
by Rainer Erich Scheichelbauer

4 July 2024 Published on 3 November 2012

You would like to know how to build letters with accents, umlauts, tildes and what have you? Super easy, I promise.

Okay, say you already finished your lowercase letters from a to z. Now think, for example, of an ‘ä’ (adieresis) and an ‘ñ’ (ntilde). We already have the a and the n. In a perfect world, all we need to build are the diacritical marks (in this case the dieresiscomb and the tildecomb) and then stick them together like Lego bricks.

Marks

All those accents and umlauts are called ‘combining marks’ in advanced typedesignspeak. Glyphs gives you all necessary marks for a language group in the sidebar of the Font tab. E.g., to build all accents for Western Latin, navigate to Languages > Latin > Western European. Right-click on it to open the pop-up that shows you all missing glyphs in that section:

At the bottom of the list, you will find a range of glyph names ending in comb. That is short for combining, which makes sense because we do want to combine them with base letters below them.

Select all the ‘…comb’ glyphs, press Generate and you’ll get eight marks. If everything went right, you should see acutecomb, cedillacomb, circumflexcomb, dieresiscomb, dotaccentcomb, gravecomb, ringcomb, and tildecomb:

All of these accents are supposed to go right above the x-height. Only cedillacomb hangs on the baseline. To get back to our example, this is what our dieresiscomb could look like:

And here’s our tilde:

Anchors

See those red dots there? These are called anchors. Anchors help connect base glyphs (like your lowercase letters) with marks. If you click on them, you can see their names. In the base letters like a and n, they are called top, bottom or ogonek:

They take the shape of a diamond if they happen to sit exactly on a metric line (like the x-height, the cap height or the baseline), which, most of they time, they should. If they are moved off the metric line, they become circle-shaped. Inside an alignment zone, they take on the shape of a square:

In the marks, however, they have the same names, except for a preceding underscore, i.e. _top, _bottom and _ogonek:

The underscored anchors are for connecting with the underscore-free anchors in the base letters, e.g., an _top anchor will look for the nearest top anchor to sit on. Think holes and studs of Lego bricks.

If you want to set predefined default anchors for a glyph, select Set Anchors (Cmd-U) from the Glyph menu. Simultaneously hold down the Option key to Set Anchors for all Masters. In the same menu, Reset Anchors (Cmd-Shift-U) will reset anchors to the defaults. Again, add the Option key to Reset Anchors for All Masters. How does Glyphs know which anchors to add? It has a built-in glyph database that contains anchor information as well. If you want to create an anchor that is not part of the defaults, you can right-click and choose Add Anchor from the context menu:

Then type the name of the anchor, and drag it to wherever you want it to go:

If you want to rename an existing anchor, you can change the name in the grey info panel. Or just select the anchor by clicking on it, and hit return.

Plus, if you select anchors, you get a grey preview of possible mark positionings, like this:

We call this a mark cloud. Nice.

Spacing

One quick note about the sidebearings of your combining marks. Since we have anchors in our marks and base letters, the spacing of the comb glyphs does not really matter. In the exported font, they will be zero-widthed automatically.

I therefore recommend choosing sidebearings that make sense for your editing pleasure: not too small so you can conveniently select them in Edit view, and not too wide so you can fit them all on a line or two and you don’t have to scroll so much. Try, for instance, the metrics keys =50 (including the equals sign) for both LSB and RSB. You can set them all at once by switching to Font view (Cmd-Opt-1), filtering for combining marks in the sidebar (Mark > Combining), selecting all combining marks and writing =50 in both sidebearings:

That way, you can always select all combining marks, hold down the Option key, and choose Glyph > Update Metrics for all Masters, and all sidebearings will reset to 50.

Don’t worry, in the exported font, the advance width will be set to zero as required. The zero-width will be where the left sidebearing is. If you want it somewhere else, add an anchor called *origin (including the asterisk) on the baseline. But really, don’t worry about it.

Components

Now we have all the ingredients, base letters and marks, both with their respective anchors. So we just have to tell Glyphs to build the diacritics for us. But which ones are there? Which ones do we need? And what are their respective glyph names?

Again, just right-click one of the entries with number badges under Languages in Font view. The number badge will tell you how many glyphs are in the list, and how many of those you already have in your font. Both adieresis and ntilde can be found under Western European:

Select them (Cmd-select multiple glyphs, Shift-select ranges of glyphs), press Generate, and Glyphs will build both letters out of components. Components are live, hot-linked copies of your original letters. You can add any other glyph as a component into your current glyph via Glyph > Choose Component (Cmd-Shift-C), and you can rebuild a glyph from scratch with its built-in component recipe with Glyphs > Create Composite (Ctrl-Cmd-C). Add the Option key to any of these commands to make them work for all Masters. The adieresis has an a component and a dieresiscomb component. Components are displayed as a grey, greenish or blueish preview instead of the paths you usually see.

Due to its nature, you cannot edit a component, only the original glyph it points to. If you want to do that, simply double click a component and its original glyph will be opened next to it. If you rather have the paths and do not care about the hot-linking, you can dissolve the components into editable outlines by choosing Decompose from the context menu of the component, or Glyph > Decompose Components (Cmd-Shift-D) to decompose all components in selected glyphs. Again, throw in your Option key to do that on all masters at once.

By default, your composites will be automatically aligned. That means that the width of adieresis is in sync with a, the relative placement of the dieresiscomb mark is done with the anchors. If you do not want automatic positioning and syncing, you can right-click on the respective component and choose Disable Automatic Alignment from the context menu:

But usually you want them auto-aligned, because otherwise you risk them shifting around. In any event, we have our diacritics now:

The green tint means that its position is entirely determined by automatic alignment. A blue tint means that its horizontal position is determined by automatic alignment, but you can still shift the glyph vertically, or, to be precise, in the italic angle. This is the case for glyphs of the Minor case, e.g., small figures:

In this example, the two.dnom is used as a component inside twosuperior. You can still drag the figure up and down, but horizontally, it is fixed inside its width.

The i and the j

So far, so good. There is one lowercase letter that poses a problem though. Or actually, there are two of them: the i and the j. If you want to put any mark on those, you need to get rid of the dot first. In other words, we need an i without a dot and a j without a dot.

Thankfully, there is a dotless i called idotless and a dotless j called jdotless. If you have already drawn your i and your j, there is a quick and easy way to create those. Just select the i without the dot and choose Component from Selection from either the Glyph menu or the context menu:

Glyphs will move the selected outlines into a new glyph, and re-insert that glyph as a component in the current glyph. For that it will ask you what that new glyph is supposed to be called:

For easy reference, it will insert the typical components for the current glyph, idotless and dotaccentcomb for the i, for example. The dialog takes a guess which one you want to create, but if it guessed wrong, you can click on the underlined glyph names, or type the glyph name yourself. Let’s assume everything went fine, and Glyphs will create the idotless for you and you’re good to go. Do the same with the j and you’ll also have a jdotless. Now we can also build i and j diacritics:

Admittedly, the lowercase j rarely takes an accent. To my knowledge, the only written languages employing a j diacritic is Esperanto, which knows U+0135 LATIN SMALL LETTER J CIRCUMFLEX, and Dutch, which, if properly encoded, puts U+0301 COMBINING ACUTE ACCENT on the j in the stressed ij. Besides that, Latin transliterations of some Indic languages may put the same combining non-spacing acute on the j. And in some phonetic alphabets, U+01F0 LATIN SMALL LETTER J WITH CARON can occur. Wikipedia states that it is also used for writing Pashto and Wakhi with the Latin script. So, all in all, there is enough reason for having a separate jdotless in your font.

When building accents based on your dotless I’d and j’s, Glyphs will prefer narrow marks. Read more about it in the tutorial on narrow marks.

Uppercase diacritics

In many designs, the regular marks are too tall for uppercase letters. This is why some designers choose to make separate marks for their uppercase letters. Note how the uppercase circumflex diverges from the lowercase design in this example:

In this case, we have two different versions of the circumflexcomb. The lowercase one is simply called circumflexcomb, but the uppercase variant also carries a .case ending: circumflexcomb.case.

Uppercase marks are done a little differently: the mark is placed above the cap height, and the anchor should be exactly on the cap height. This, for instance, is what the caroncomb.case looks like:

Note how the _top anchor, and as a consequence, the whole shape, sits on the cap height rather than the x-height.

Once you have your .case marks, you can build your uppercase diacritics like you did your lowercase ones. You can force a rebuild of an already existing diacritic letter by choosing Glyph > Create Composite (Ctrl-Cmd-C), and again, add the Option key for all masters.

Slashes and strokes

Center marks are not listed in the sidebar. That includes strokes and slashes for glyphs such as:

Dcroat dcroat
Eth
Hbar hbar
Lslash lslash
Oslash oslash
Tbar tbar

… and many more, these are just the ones in the Western, Central and Southeast European glyph set. The marks for them require a certain naming, and it is pretty logical, actually. Just concatenate the following parts:

  1. stroke if it is horizontal like in Ħ, Đ, Ŧ; or slash if it is diagonal like in Ł or Ø.
  2. short if it crosses one stem like in Ł or Ŧ; or long if it crosses more stems like in Ø or Ħ.
  3. comb always follows.
  4. no dot suffix if it is for lowercase letters, .case if it is for uppercase letters, .sc for smallcaps, or any other dot suffix you are intending (see below).

So, the line through Ø would be called slashlongcomb.case, the one crossing ħ or đ is called strokeshortcomb. If you need a different horizontal stroke for ŧ, you can call it strokeshortcomb.t. More info about dot suffix tricks in the following section.

Special marks

Likewise, you can add alternate marks for certain base letters by adding the name of the base letter as suffix. E.g., circumflexcomb.g will be preferred for composing or recomposing gcircumflex.

Or the other way around: You can have alternate base letters for top marks if you add a .topAccent suffix to the letter. Read more about it in the tutorial about adapted base letters for more details.

Similarly, marks with a feature tag suffix will be preferred for all glyphs of that feature. Example: dieresiscomb.ss01 will be preferred for adieresiscomb.ss01. Same goes for .sc for smallcaps or .pc for petite caps, or .loclPLK for Polish variants, etc.

Legacy marks

You may have noticed that in the Marks category, there is a Legacy section:

You see, there are thirteen of them, and they all lack the comb at the end of their names. They only exist for historic reasons, but unfortunately, we cannot do without them. A font needs legacy marks for backwards compatibility. Actually, they are the colored placeholders you see in apps like TextEdit after you type the accent key, and before you type the base letter:

But now that we have our combining accents, it feels unnecessary to redraw them. Even copying and pasting seems like a waste of time, because if our default accents change, we would need to change the legacy marks as well.

Luckily, we have components! And as it so happens, there is an easy way to produce legacy marks as component copies of their combining siblings. All you need to do is right-click on the Legacy section, select all marks, and click Generate:

This will generate legacy marks and insert the respective combining marks as components into them. Now your font is more compatible! And the best thing, the legacy marks will inherit the sidebearings you set for the combining marks, so you have well spaced legacy marks.

Hint: There are two notable exceptions when it comes to the display of spacing accents. When typing a tilde or a circumflex, most apps will display the symbols asciitilde and asciicircum instead of the actual marks tilde and circumflex. So make sure you also have those in your glyph set. Otherwise, office apps like TextEdit may default to a fallback font. Design-wise, the two glyphs are usually drawn a little larger and lower than the marks. In case you are looking for them in the sidebar, Glyphs lists them under Symbol, and the subcategory Math.

That’s it for now. Have fun extending the language support of your font. A modern Latin font should at least have Western European, Central European and South Eastern European covered. Go for it.

Useful scripts and plug-ins

In the mekkablue scripts, you will find a few useful scripts

  • Anchors > Anchor Mover: batch-process anchor positions in selected glyphs. Great for moving all bottom anchors back on the baseline in case they shifted, and similar things.
  • Anchors > Batch Insert Anchor: insert an anchor in all selected glyphs, on all layers, and pick the approximate spot.
  • Anchors > Insert All Anchors in All Layers: makes sure all anchors are replicated in all layers in the same relative positions. Good for fixing anchor compatibility.
  • Anchors > Realign Stacking Anchors: On all layers in combining marks, top/_top, bottom/_bottom, etc. anchor pairs are realigned in their italic angle by horizontally moving underscore-prefixed anchors.
  • Components > Alignment Manager: manage automatic alignment for (multiple) selected glyphs.
  • Components > Component Problem Finder: find and report possible issues with components.
  • Components > Move Paths to Component: moves paths to a separate glyph and insert them as auto-aligned, anchored components in the source glyph. Perfect for making path+component mixtures into pure composites, and it does it slightly better than the built-in Component from Selection. You can specify the connecting anchor, for instance.

Jeremy Tribby has a script called Decompose Combining Marks in all Masters in his script collection.

Tim Ahrens’ Alignment Palette helps you batch-manage component alignment.

The Show Component Order extension will add itself to the View menu. It color-codes components, and you can easily spot wrong component orders (base glyph comes first, accents follow) or unaligned components:


SAMPLE FONT: GALLENSIS BY PETER RENN AND SCHRIFTLABOR.

Update 2014-12-11: updated to new notation for dotless glyphs.
Update 2015-03-28: rewrite for Glyphs 2.0 to reflect combining marks, added section about legacy marks.
Update 2016-01-18: added additional occurrences of j diacritics. Thx Igor Freiberger.
Update 2017-01-09: added hint about asciicircum and asciitilde. Thx komplicado for pointing this out.
Update 2018-07-28: fixed some typos. Thx Nathalie.
Update 2022-16-08: minor formatting changes, menu title Create Composite.
Update 2024-07-04: partial rewrite for Glyphs 3, new screenshots with Gallensis.