https://bugs.kde.org/show_bug.cgi?id=353300
Sune Vuorela <k...@pusling.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |k...@pusling.com --- Comment #6 from Sune Vuorela <k...@pusling.com> --- (In reply to Saladin Shaban from comment #5) > Diggin some more into the issue: > https://chat.openai.com/share/d2f74bc7-6c7b-437d-ac17-e71ae73f689b > > The problem now is the way TinyTextEntity's are sorted according to their > positions from left to right. This seems to be crucial to the text selection > logic, and cannot be changed without extensive modifications. > > I'm not sure about the right way to proceed from here. Some possibilities > are: > > 1- Reorder the text in the Find bar before performing a search, with Qt's > equivalent of fribidi_reorder_line(). > > 2- For text-based documents, delegate search and selection to the > QTextDocument class itself. > > 3- Skip sorting the text entities, and adjust the search and selection > methods accordingly. > > The first option is the least intrusive, while the second seems to offer > greater possibilities, like handling the peculiarities of Arabic search and > other languages: > > https://community.scripture.software.sil.org/t/search-arabic-text-without- > tashkeel/882 > https://help-nl.oclc.org/Discovery_and_Reference/WorldCat_Discovery/ > Release_notes/2023_release_notes/ > 040WorldCat_Discovery_release_notes_Arabic_language_support > > QTextDocument doesn't seem to support these yet, but it's something I might > be able to contribute to Qt. There is https://invent.kde.org/graphics/okular/-/merge_requests/595 which claims to fix it. Though it likely introduces a significant memory leak. I don't know enough about any RTL language to be able to really test and work on it, but I have prepared https://invent.kde.org/graphics/okular/-/merge_requests/905 which should make it easier with the memory management on top of it. -- You are receiving this mail because: You are watching all bug changes.