Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.9.0
-
None
-
Qt 5.9.0 + Ubuntu 16.04 x86_64
Description
Hi, rich text renderings with RTL languages are partially broken, elements aren't correctly decorate if the text string begins with rtl characters (which makes the text rendering RTL ), however its fine when the text starts with LTR characters (which makes the rendering LTR).
Take look at these codes
1. all LTR chars (Correct) :
import QtQuick 2.9 Text { textFormat: Qt.RichText text: "<p>Hello<img src=\"https://cdnjs.cloudflare.com/ajax/libs/emojione/2.2.7/assets/png/1f600.png\" width='50' height='50'>How are you</p>" font.pixelSize: 50 }
2. Start with LTR and ends with RTL chars (Correct)
import QtQuick 2.9 Text { textFormat: Qt.RichText text: "<p>Hello<img src=\"https://cdnjs.cloudflare.com/ajax/libs/emojione/2.2.7/assets/png/1f600.png\" width='50' height='50'>خوبی؟</p>" font.pixelSize: 50 }
3. All RTL chars (Wrong):
import QtQuick 2.9 Text { textFormat: Qt.RichText text: "<p>سلام <img src=\"https://cdnjs.cloudflare.com/ajax/libs/emojione/2.2.7/assets/png/1f600.png\" width='50' height='50'>خوبی؟</p>" font.pixelSize: 50 }
as you can see, two words "سلام" and "خوبی" are separated by emoji picture, but the text renderer joins them together!
4. Starting with RTL and ending with LTR (Wrong):
import QtQuick 2.9 Text { textFormat: Qt.RichText text: "<p>سلام <img src=\"https://cdnjs.cloudflare.com/ajax/libs/emojione/2.2.7/assets/png/1f600.png\" width='50' height='50'>Hello How Are you</p>" font.pixelSize: 50 }
PS: How i can attach images here? the JIRA tells me about missing tokens and dont' let me upload pictures here
Attachments
Issue Links
- relates to
-
QTBUG-126867 Mixing RTL and LTR language breaks QML Text layout
- Closed