SUMMARY Left and Right has the same meaning for Arabic as other languages. However, "Align Left" in Krita keeps the text aligned right for Arabic (RTL). Krita chose to use SVG's attribute text-anchor:start instead of text-anchor:left when left is explicitly chosen. The same applies for right. text-anchor:start only makes sense when no alignment explicitly chosen. STEPS TO REPRODUCE 1. Choose SVG Text Tool. 2. Type Arabic text. (Result: text is right-aligned which is correct). 3. Click the "Align Left" button. (Result: Nothing changed where it should left-align). OBSERVED RESULT Text is right-aligned EXPECTED RESULT Text should be left-aligned after clicking "Align Left" SOFTWARE/OS VERSIONS Linux: Arch Linux KDE Plasma Version: 5.20.1 KDE Frameworks Version: 5.74 Qt Version: 5.15.1 ADDITIONAL INFORMATION Calligra Words does the alignment correctly so it can be used as a reference.
Remove triaged keyword from CONFIRMED bugs
Still happens in Krita 5.2.13 (git 6d3651a) with Hebrew as well. The buttons are working but in reverse order, it's irrelevant for SVG, it's only working in Rich Text anyway.
Over the past four years, we've completely rewritten text handling in Krita, so we won't be fixing issues in the 5.2 releases. Could you check with Krita Next nightly build?
(In reply to Halla Rempt from comment #3) > Over the past four years, we've completely rewritten text handling in Krita, > so we won't be fixing issues in the 5.2 releases. Could you check with Krita > Next nightly build? I see it was completely changed but now I can't find how to align rich text at all.
I checked nightly build and the alignment is still wrong. Changing the alignment now flips the text box like a mirror so it could go out of the border which is not the correct behaviour
It is correct, actually. This is because the default dragging mode is inline-size (https://svgwg.org/svg2-draft/text.html#InlineSize) and not text-in-shape, so there's no text box being moved. I'll look into seeing if I can get the whole text shape to move if it switches anchors, but the main question whether the text is flowing into the direction you expect it to.
(In reply to wolthera from comment #6) > but the main question whether the text is flowing into the > direction you expect it to. In Text Properties, the three icons labeled “Text Alignment” work for left, center, and right. When expanding that section, there’s also a Text Align: dropdown with the options: Left, Start, Center, End, Right, and Justified. I tried changing these, but nothing changed in the text. This is my first time using the new Krita build from master, so I might be missing something obvious.
(In reply to Munzir Taha from comment #7) > (In reply to wolthera from comment #6) > > but the main question whether the text is flowing into the > > direction you expect it to. > > In Text Properties, the three icons labeled “Text Alignment” work for left, > center, and right. When expanding that section, there’s also a Text Align: > dropdown with the options: Left, Start, Center, End, Right, and Justified. I > tried changing these, but nothing changed in the text. This is my first time > using the new Krita build from master, so I might be missing something > obvious. Ok, then everything is working correctly and I'll just need to disable those for inline-wrap (they only work for text-in-shape as well, the SVG spec is kinda weird like that).
(In reply to wolthera from comment #8) > Ok, then everything is working correctly and I'll just need to disable those > for inline-wrap (they only work for text-in-shape as well I tested the text-in-shape feature by creating a circle, selecting the text tool, and typing Arabic inside it. The alignment options work correctly for English (LTR), but for RTL text the “Start” option aligns the text to the left instead of to the right.
That's because the paragraph direction isn't determined automatically, it's how SVG works. Inkscape does the same. You need to add "direction: right to left" by going into the paragraph tab in the text properties and going to add property, and selecting "direction". You can also make this into a style preset that you can then use to create any future texts.
Thanks! It makes sense now.
Super, then I'll close this bug. I had been theorizing we should have a default style preset for particular type setting traditions, so east-asian could have vertical writing mode, and I am also considering one for right-to-left scripts, so it'll be easier to setup for new comers. I still need to consider the details here, but this report does make it clear it'd be useful.