Calt OTF issue in RTL font (Adobe Illustrator, Windows 10)

Hi there,
I’m creating a new font which will have initial, medial and final sets of glyphs and use open type features (calt) to replace regular glyphs (medial) with initial or final on their places. The font will be used for creating name pendants. Manual is here: Features, part 4: positional alternates | Glyphs

So when user type some name, e.g. jesssica, initial glyph will be replaced with capital glyph and ring (J.init) and the last glyph will be replaced with alternate glyph with ring (a.fina).

I’ve created 4 classes:

  1. initial - all initial letters (capitals with left ring)
  2. final - all final letters (lowercase with right ring)
  3. medial - all regular lowercase letters in the middle of the word
  4. all letters - all of these letters

I’ve added calt rule to OTF which contains next:

lookup calt2 {
    ignore sub @all_letters @medial';
    sub @medial' by @initial;
} calt2;
lookup calt3 {
    ignore sub @medial' @all_letters;
    sub @medial' by @final;
} calt3;

So, left-to-right direction fonts work very well on both Mac and Windows 10 but when I create fonts with right-to-left direction (Arabic, Hebrew) it looks fine on Mac but converts all glyphs to final on Windows 10.

Excuse me, I don’t know how to check OTF on the fly in Glyphs so I would appreciative if you teach me. If I open the exported font in trial FontLab I can see that Glyphs automatically generate aalt feature which contains “feature calt;”. When I press checkbox calt everything works fine (the first and the last glyphs are replaced with initial and final glyphs with rings) but when I press aat all glyphs replace with final glyph (like on Windows 10).

Turned on aalt:
37

Thanks in advance for your help

The aalt feature should not contain the ccmp feature. It should be generated on export. You should see it in the Feature list. Remove ccmp from it.

Thanks for reply,
there is no ccmp function, there are only a few functions that I’ve created from scratch:
aalt (contains calt feature)
calt (contains rules to replace medial glyphs with initial and final glyphs)
kern
dlig (some ligatures)
init (generated automatically by Glyphs app, I’d disabled it)

Sorry. I meant calt and not ccmp. Don’t add calt to aalt (or remove it if Glyphs puts it there).

For positional RTL scripts (definitely Arabic, but I believe also Hebrew), you do not need the calt lookups described in that tutorial. These are just for faking positional substitutions in non-positional scripts like Latin or Cyrillic.

In Hebrew and Arabic, you just need to add glyphs with the right suffixes and update your features. The shaping engine should pick the right feature accordingly.

Thanks a lot. Do you have some links for manuals where I can find more?

Hebrew does not have Arabic-like positional shaping behavior. Fonts needing this will have to do the context analysis themselves, like in Latin text.

Thank you all for your help. It was Adobe Illustrator issue. I don’t know why but issue starts when I turn on ‘Middle Eastern and South Asian composer’. When I switch to ‘Adobe composer’ everything goes fine but letters go from left to right. In the same time the font works fine on AI for Mac and in the webpage.

As you need the Middle Eastern composer for Hebrew, disabling it is not a solution. The different composers behave differently and if something doesn’t works in the Middle Eastern composer, it might have to do with the languageSystem settings.