1

If I type a letter "a" and the acute accent mark, I want the result to be á. These are technically still separate characters: the "a" and the "combining acute accent above" characters. How do I get this to work in FontLab, any tutorials or anything? Basically I have custom diacritics in my custom language. I want to have the ability to place a "dot" above a character, and "accent mark" above a character, AND ALSO STACK an accent mark above a dot above a character. How can I do this in FontLab using unicode combining characters? Do I need to do anything with Kerning or anything? How does this work even?

1

1 Answer 1

1

Per the manual, base glyphs and accents are attached using "anchors," named coordinates on the glyph that provide information on where to place the glyph. The manual, unfortunately, is currently largely useless for telling you how this is used.

Adding anchors (in the manual)

Press Ctrl+Alt+Shift+R to insert an anchor. An anchor has the following properties:

  1. A name
  2. An X coordinate
  3. A Y coordinate

In other words, it's a dictionary entry that allows you to look up a vector with a string (name). But for the program to know precisely what to look up, it needs the names to follow a certain pattern.

Give the anchor on the base glyph a name, like umlaut. Then, you will have to name the anchor on the combining glyph the same name, but preceded by an underscore, as in _umlaut. This allows the program to treat the anchors as a joint at which to combine the two glyphs.

Unfortunately, if you try this according to the manual, it will not respect the anchors and instead just align the two characters by their respective [0, 0] vectors.

Proper glyph generation (not in the manual)

As the manual says, generating precomposed glyphs is handled by the Generate Glyphs window Ctrl+Alt+G. You type in a "recipe" like tengwar_nde = tengwar_nd + tengwar_e and check the "Use Auto Layers" box and it will generate the glyph for you.

Unfortunately, this is exactly how you get [0, 0]-aligned overlaid characters. The manual does not explain this.

It turns out that a diacritic is allowed to have multiple possible attachment points (presumably so combining acute above and combining acute below, etc., didn't have to be different glyphs), and rather than attempt to programmatically decide which one to default to, the FontLab devs appear to have simply forced you to always write it out explicitly. What this means for you is that, in your recipe, you have to follow the diacritic's name with an @ character and the name of the anchor to align to. In the case of the umlaut, that looks like this:

u_umlaut = u + combining_umlaut@umlaut

Diacritic stacking

Finally, to attach multiple diacritics above or below a character, you simply need to adjust the location of the appropriate anchor. This is done by placing a base glyph anchor on the diacritic. For instance, if I want to create the character ế, and the circumflex has the following anchors:

{
    "_top": (100, 725)
}

You add an additional anchor:

{
    "_top": (100, 725),
    "top": (100, 850)
}

And now you can stack another circumflex, or any diacritic that attaches to top, atop the circumflex (or atop a precomposed character containing one).

Stacking diacritics at different anchors

This syntax, however, will always attach a glyph to the preceding glyph! If you're making a Vietnamese, Fuzhounese or Greek (Polytonic) font, and thus you need to attach diacritics to the same base character at different anchors, you need to explicitly specify that in the auto layer syntax.

Say you want to write the in tiếng Việt. You'd naively attempt to write e + combining_circumflex@top + combining_dot_below@bottom. But the circumflex doesn't have a bottom anchor so you'd have a weird bottom-left dot that doesn't belong there. Instead, you can insert an additional identifier with a scope operator (:) to identify which glyph has the anchor you need to attach, as in e + combining_circumflex@top + combining_dot_below@e:bottom.

1
  • Added a new section in the case of diacritics being attached to different anchors at once.
    – TheLeanest
    Oct 12, 2021 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.