Bug 392065 - New text tool mirror the rectangle in case of proper RTL sentences instead of aligning them
Summary: New text tool mirror the rectangle in case of proper RTL sentences instead of...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tool/Text (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-19 15:27 UTC by Safa Alfulaij
Modified: 2018-04-03 11:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Krita displaying Arabic text and starting the rectangle from the left side (check related bug for original box) (37.02 KB, image/png)
2018-03-19 15:27 UTC, Safa Alfulaij
Details
Krita displaying Arabic and English texts (45.08 KB, image/png)
2018-03-19 15:27 UTC, Safa Alfulaij
Details

Note You need to log in before you can comment on or make changes to this bug.
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