qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
9.81k stars 2.89k forks source link

Annotation dose not support properly RTL text #57123

Open nabazgharib opened 2 months ago

nabazgharib commented 2 months ago

What is the bug or the crash?

When adding a popup, HTML or Text Annotation, then adding RTL Text like (Arabic or Kurdish), the text is trimmed inside the HTML and always LTR when using Text Annotation. when sing HTML, the right part of the text is trimmed. and when using Text Annotation, I cannot align the text to Right image

Steps to reproduce the issue

  1. Enabe Advcaned annotation toolbar.
  2. Add either HTMl or Text anntioation.
  3. Add this text:
  4. تیمی ڕۆژ هەڵات چاککردنی عەموود. بەهۆی پێکدادان سەیارە لە گەڵ عەمودەکەدا، کێبڵەکان کەوتونەتە سەر یەک. کاتی دەست پێککردن:

The text inside the popup should be RTL and appears like below: image

Versions

QGIS version 3.36.1-Maidenhead QGIS code revision 3e589453 OS version Windows 10 Version 2009

Supported QGIS version

New profile

Additional context

No response

agiudiceandrea commented 2 months ago

@nabazgharib, thanks for reporting. Please provide a sample layer and project with which the issue occurs. May you try if the issue does occur also using QGIS 3.28 on your system? See also: https://github.com/qgis/QGIS/issues/54098.

nabazgharib commented 2 months ago

@nabazgharib, thanks for reporting. Please provide a sample layer and project with which the issue occurs. May you try if the issue does occur also using QGIS 3.28 on your system? See also: #54098.

I did not try it with QGIS 3.28, I just tried on 3.3x. I provided a sample text on the post: تیمی ڕۆژ هەڵات چاککردنی عەموود. بەهۆی پێکدادان سەیارە لە گەڵ عەمودەکەدا، کێبڵەکان کەوتونەتە سەر یەک. کاتی دەست پێککردن: if you just add an HTML annotation with dir:rtl it should appear as in the screenshot in the top post.

agiudiceandrea commented 3 weeks ago

@nabazgharib, please try using the latest available QGIS versions 3.36.3 or 3.34.7 and check if the issue still occurs.

nabazgharib commented 3 weeks ago

@agiudiceandrea , thanks for your follow up. still getting same issue.

image

I attached the HTML code, so you can test it. if you look at the beginning of the text, on both screenshot and the html source, you can notice the beginning of the second and third line is cut.

`

تیمی ڕۆژ هەڵات

چاککردنی عەموود.

ڤبەهۆی پێکدادان سەیارە لە گەڵ عەمودەکەدا، کێبڵەکان کەوتونەتە سەر یەک. کاتی دەست پێککردن:

`

agiudiceandrea commented 3 weeks ago

@nabazgharib, please provide a simple project (and layer if needed) with which the issue occurs.

nabazgharib commented 3 weeks ago

Yes, here it is. unicode_html_annotation_github.zip

github-actions[bot] commented 1 week ago

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue. If there is no further activity on this issue, it will be closed in a week.