Side bearings in Automatic alignment for Arabic

Hi there. I’m designing a font based on Arabic script. I have some glyphs that made of two or more components. I use “#entry” and “#exit” anchors to make them sit in their right place. I want Automatic alignment to get the RSB from the rightmost component’s RSB and the LSB from the leftmost component’s LSB. OK; In LTR languages If a glyph consists of several components, its components are probably arranged from left to right. In this case, the first glyph is considered to be the leftmost and the last glyph is considered to be the rightmost.
So I think Automatic alignment will set first component’s LSB as our glyph’s LSB and set the last component’s RSB as the RSB of our glyph.
So, what should I do for Arabic? The components supposed to be arranged from right to left. So I need the first component’s RSB and last one’s LSB as my glyphs side bearings. Yes; I can reverse everything. change entry and exit anchors places and import the component from end to beginning. But this method doesn’t look principled. I need Automatic alignment because I have lots of this kind of glyphs and it makes my design process easy and clean.

In Arabic, all text and components are RTL. So exit/entry anchors need to follow that direction, too: entry needs to be on the right side of the shape, and the exit on the left.

Thanks for quick responding Georg.
Connecting “exit” of first-added component to “entry” of next-added component; this is how exit/entry works.
For a glyph like “reh-ar”, I’ve divided it into two components :


you can see two parts of it and the result. LSB is 0 for first part and RSB is 0 for second one.
Now the glyph itself :


It’s clear in picture.
LSB line is sticked to leftmost node of first part and RSB line is sticked to the rightmost node of second part, which means 0 for each part. so it inherits LSB from first-added component and RSB from the second one.
I mean it should be reversed for Arabic. RSB of first one and LSB of second one should be inherited.
Something like this :

I did it by reversing all steps; that I think is not the best solution.

Can you set the script and writing direction of the element glyphs to “Arabic” and “RTL” (select them in font view and choose Edit > Info for Selection).

Yes, Solved.
Thanks.