Created attachment 139403 [details] a screenshot that demonstrates the bug shaped (may be just arabic) text messed after being selected (or highlighted by search), it displays fine when deselect STEPS TO REPRODUCE 1. write some arabic text, example: مثال 2. select it OBSERVED RESULT messed up (the final glaph lose its context, so it change its shape and make reader think it is another word) EXPECTED RESULT should not change its shape SOFTWARE/OS VERSIONS Linux/KDE Plasma: (available in About System) *I could get them it is not mentioned because of some reason so I will get versions from APT* KDE Plasma Version: 5.20.5 KDE Frameworks Version: 5.78.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION I attached a screenshot, it will make everything clear
KDE Frameworks 5.78.0 Qt 5.15.2 (built against 5.15.2) The xcb windowing system
confirmed
needs to be fixed in upstream qt.
Reopening as it is fixable in KTE Regardless it would be better to get this fixed in Qt.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/515
Git commit 9394bcede083e0973c27b57422327f0f647d1c5b by Christoph Cullmann, on behalf of Waqar Ahmed. Committed on 24/03/2023 at 09:56. Pushed by cullmann into branch 'master'. Fix RTL text with format incorrectly shaped This fix is a work around the bug in Qt. Ideally it should be fixed there but we can do what is possible here. The problem is mentioned in details in the comments of this script. Short version is that Qt's text shaping code is naive. It breaks the text into boundaries which make no sense and this leads to bad results. We can also fix this for Foreground text/Underlines etc but lets see if we get a bug for that first. M +61 -5 src/render/katerenderer.cpp M +1 -1 src/render/katerenderer.h https://invent.kde.org/frameworks/ktexteditor/commit/9394bcede083e0973c27b57422327f0f647d1c5b
Git commit 3fa5182f2738561dfaf7ec2a69f1d8b5fed73a95 by Waqar Ahmed. Committed on 04/04/2023 at 18:55. Pushed by cullmann into branch 'kf5'. Fix RTL text with format incorrectly shaped This fix is a work around the bug in Qt. Ideally it should be fixed there but we can do what is possible here. The problem is mentioned in details in the comments of this script. Short version is that Qt's text shaping code is naive. It breaks the text into boundaries which make no sense and this leads to bad results. We can also fix this for Foreground text/Underlines etc but lets see if we get a bug for that first. M +61 -5 src/render/katerenderer.cpp M +1 -1 src/render/katerenderer.h https://invent.kde.org/frameworks/ktexteditor/commit/3fa5182f2738561dfaf7ec2a69f1d8b5fed73a95