Advanced diacritics: adapted base letters

by Rainer Erich Scheichelbauer

21 July 2022 Published on 18 July 2020

Imagine having letters that react to the diacritic mark on top of them, like a lowercase g that shifts its ear to make space for a circumflex. Neat, right? Simple, too. Here is how you do that.

You can make variants of your base letters with suffixes like .topAccent or .bottomAccent, then this letter will be preferred for generating compounds with marks that make use of the indicated anchor.

I know, sounds complicated, so here is an example. Say you have a lowercase g with a funky ear. Very nice, but it may get in the way of top accents in compound glyphs like gcommaaccent, gcaron or gdotaccent. So you can duplicate your g, name it g.topAccent and flatten its ear, perhaps like this:

The next time you create a g composite that has a top-connecting mark, say gcircumflex, the .topAccent variant will be preferred for the base:

One base letter for multiple anchor types

You can also combine multiple anchors in one such suffix. Make sure the names of the anchors are:

  • written without any spaces in between,
  • camel-cased, and
  • in alphabetical order.

Good examples: .bottomTopAccent for bottom and top anchors, .bottomOgonekAccent for bottom and ogonek anchors, or .hornToprightAccent for horn and topright anchors. Easy.

Update 2022-07-10: better topic assignment.
Update 2022-07-21: updated title, minor formatting.