| Summary: | "Align Left" in Krita keeps the text right-aligned for RTL languages | ||
|---|---|---|---|
| Product: | [Applications] krita | Reporter: | Munzir Taha <munzirtaha> |
| Component: | Tool/Text | Assignee: | Krita Bugs <krita-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | griffinvalley, halla, munzirtaha, sh.yaron |
| Priority: | NOR | Keywords: | rtl |
| Version First Reported In: | 4.4.0 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Munzir Taha
2020-10-20 20:33:24 UTC
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. |