Bug 392065

Summary: New text tool mirror the rectangle in case of proper RTL sentences instead of aligning them
Product: [Applications] krita Reporter: Safa Alfulaij <safa1996alfulaij>
Component: Tool/TextAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: normal CC: halla
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Krita displaying Arabic text and starting the rectangle from the left side (check related bug for original box)
Krita displaying Arabic and English texts

Description Safa Alfulaij 2018-03-19 15:27:10 UTC
Created attachment 111509 [details]
Krita displaying Arabic text and starting the rectangle from the left side (check related bug for original box)

Related to: https://bugs.kde.org/show_bug.cgi?id=392064

Even after supporting the "direction" property, Krita starts the text from the left side of the bounding rectangle (moving the whole rectangle to left) instead of aligning the text inside it to right.

If mixed with LTR sentences it's hard to get the correct results unless you used two text boxes.

Sample text used (Don't care about the wrongness in the web browsers, they can't handle both directions):
كريتا هو برنامج للرسم الرقمي!
Krita is a digital painting tool!
Comment 1 Safa Alfulaij 2018-03-19 15:27:53 UTC
Created attachment 111510 [details]
Krita displaying Arabic and English texts
Comment 2 Halla Rempt 2018-03-20 07:12:19 UTC
Dmitry can you take a look at this as well?
Comment 3 Dmitry Kazakov 2018-03-26 13:24:20 UTC
Git commit cd9f29cdc08a7cba26f98651117cdab76bb55e23 by Dmitry Kazakov.
Committed on 26/03/2018 at 13:22.
Pushed by dkazakov into branch 'master'.

Fix alignment of the RTL text

M  +47   -2    libs/flake/text/KoSvgTextShapeMarkupConverter.cpp

https://commits.kde.org/krita/cd9f29cdc08a7cba26f98651117cdab76bb55e23
Comment 4 Halla Rempt 2018-04-03 11:48:05 UTC
Git commit aa923e20d87a933039f9e793caa1d5800c7a0dab by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 03/04/2018 at 11:16.
Pushed by rempt into branch 'krita/4.0'.

Fix alignment of the RTL text
(cherry picked from commit cd9f29cdc08a7cba26f98651117cdab76bb55e23)

M  +47   -2    libs/flake/text/KoSvgTextShapeMarkupConverter.cpp

https://commits.kde.org/krita/aa923e20d87a933039f9e793caa1d5800c7a0dab