Restore Bi-Directional text support
Summary:
Fix regression introduced by commit a565bc9 (Clip character drawing
to its own cell). When the first character in a text fragment is
classified as RTL, rest of the fragment is also considered to be RTL
and is passed to drawText() as one string. The rendering is not
perfect (especially when RTL and LTR characters are mixed), but it
works as before.
BUG: 393644
Test Plan:
- Display example sentences using a program which prints text directly to terminal (e.g. echo, cat):
حروف به هم پیوسته کِیدیئی (به انگلیسی: KDE) پروژهای برای توسعه یک میزکار آزاد و متن باز است.
- Display the sentences in Konsole built before commit a565bc97337a3bfc3a027f46aa2dec3e9a6f8618
- Compare visually
Reviewers: Konsole, sassanh, hindenburg
Reviewed By: Konsole, sassanh, hindenburg
Subscribers: hindenburg, Konsole
Tags: Konsole
Differential Revision: https://phabricator.kde.org/D12655