Tilde not working with some letters

Hello,

I generated some glyphs using the tildecomb that I designed. I already had the “tildecomb” and “tilde” and worked well on the letter “a” and “o” (atilde and otilde). However, when I generated the “etilde”, “otilde”, “ytilde”, these didn’t work when I typed. When I type the combination (That is when I put the tilde and then the letter on the keyword) they appear as separate glyphs like this: “˜e” instead of on the top. The other “combs” works well, it’s only the tilde with those letters. Can you help me solve this?

Thank you.

Does your keyboard support those letters?

Aside of input issue Rained mentioned, there are a few different approaches to display combined marks in a right position.

  1. Mark
    To display e + tildecomb (in a right mark position), both base (e) and mark (tildecomb) must contains an appropriate anchors. This way the Mark feature will be generated during the export. I suppose this is most progressive approach, however it may lack of support in some very old applications.
  2. GPOS
    In that table you may describe how the combined mark should be positioned relative to the base character.
  3. Composition
    To display one precomposed etilde (instead of e + tildecomb), the font need to contain the Glyph Composition / Decomposition feature with an appropriate receipt. This approach is considered obsolete because it recommends the generation of additional combined glyphs, which increases the size of the font file, but it is bulletproof.

I think, nowadays only the first option should be used.

1 Like

And 1 and 2 are really the same thing. Moving a mark (all moving happens in the GPOS table) needs to be connected to mark and mkmk features. Other features don’t really make sense for marks. Theoretically kern, but that is not really intended for mark positioning.

If there is a Unicode for the combo of letter plus combining mark, some shaping engines will enforce precomposition, option 3 in the above list. Even though Unicode sees both variants (precomposed and mark-positioned) as equivalent.

1 Like

Hi Rainer, Georg and Michael,

Thank you for your replies. I’m not very familiar with engineering and coding in type design, but I guess the automatic feature that generates different combined marks doesn’t support or include those combinations (for example “etilde”) as they are not very common. Probably that’s why it is rendered correctly when I type the tilde + the a, as this is a more common combination. In my case, the font is intended to cover the Guaraní that includes those diacritics.

As Michael suggest if I used the Composition approach. I included an instruction in the Composition / Decomposition feature group as a substitution of the “e tilde” by the “etilde” glyph (u+1EBD) as well as the other combined marks. This worked as each time I type the tilde and then the e it is rendered correctly.

I’m not sure if this is the best approach or do you consider there’s a better way? As I mention I’m not super familiar with the coding/engineering of fonts

Thanks for the support

when you type “tilde” + a letter, the keyboard input method is building the precomposed glyph. The font has mohtin to do with that (other than supplying the needed glyphs).

Exactly. And not every keyboard layout supports every tilde combination. Most will support tilde plus an and o, also u. Tilde key plus e and i is less common.

I didn’t know that. Thanks for letting me know. As you mentioned, my keyboard does not support the tilde pulse e or i. I think not many keyboard layouts support that. Considering that, I guess “forcing” to render those glyphs is the best approach. I put inside the code a function that substitutes each e plus tilde by the combo as if it were a ligature. I saw the font Andada by Carolina Giovagnoli, and I think she uses that approach to support the Guaraní in different keyboard layouts. Would you recommend me to take this approach? Also, where should I include that instruction? Right now I have it inside the composition/decomposition feature and it seems to work well.

Thanks

No. That would be counterproductive.

Guaraní keyboards have a g-tilde key that produces the sequence g + tildecomb. That is not a ligature, it is two separate glyphs connected by mark positioning, and it works completely without a precomposed gtilde letter. Mark positioning is rare in Latin, very common in most scripts. If you do want to add a precomposed glyph, make it a mark ligature like g_tildecomb, but this is not necessary.

The issue here is different. Your keyboard simply does not have the key combo. But it is not your font’s job to fix third party software. The people that need the letters will have keyboard layouts that actually support the Unicode values in question. They are not using yours.

So: It is the job of the input system (e.g. keyboard layout) to produce the right sequence of Unicode values. Each keyboard layout has its limitations, so it’s normal that yours doesn’t support ẽ, but others do. All you need to make sure is that the glyphs have the right Unicode values assigned.

Sometimes, yes, there are hacks in fonts, but only for things that are not supported by any keyboard layout (yet). Or for very special cases like the Romanian cedilla vs comma accent issue.