Automatically aligned components in 0-3 Farsi numerals are shifted in 3402

In 3402 update, I noticed that Glyphs proposed me to apply automatic alignment (actually update automatic alignment, because it was already enabled previously) for the following glyphs:

zeroFarsi-ar
oneFarsi-ar
twoFarsi-ar
threeFarsi-ar

These glyphs made from components of base Arabic numerals, and automatic alignment was on previously. Now automatic alignment is off, and if I enable it again, then the components shifts to the right side out of bounding box.

This shift happens for any project – an existing ones and for a new one. Here’s an example.

Reference shape:

Component that has lost automatic alignment but still looks right:

This is what happened if I turn automatic alignment on again:

Might be related to this:

Hi Sebastian. Looks similar (because of the shift). Only the difference is in my case there are no transformations applied.

I’ll have a look.

Can you send me the file? It seems to work fine for me.

Sent two files – an old one (where alignment update window appears when opening the file) and a new test one.

Oh my God. The issue was in GlyphData.xml, again. I used 4 entries for these glyphs to generate composites, and since it’s Arabic, I added direction="RTL" and it caused an issue. Now I removed this attribute. I’m sorry you wasted your time on this.

Arabic numeral are always LTR.

It’s actually a funny story why that is. When Europeans adopted Arabic numerals, they read them left to right (LTR), starting with the largest unit—just as we do today (e.g., “one thousand two hundred thirty-four”). However, in Arabic, numbers are traditionally written with the smallest unit first, following the right-to-left (RTL) direction of the script (e.g., “four thirty two hundred one thousand”).

When Arabic was adapted for computer encoding, programmers followed the convention already established for numerals in LTR languages—writing numbers with the largest unit first. As a result, Arabic numerals in digital systems also follow this order, despite the natural RTL flow of the script.