-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed the problem with characters like '⧸' (U+29F8) (#565)
As Qt explains in https://doc.qt.io/qt-6/qfont.html#StyleStrategy-enum, "if the font selected for a certain writing system does not contain a character requested to draw, then Qt automatically chooses a similar looking font that contains the character." This caused a problem for us because the width of the replacing character might be smaller than the monospace width, while the code expected the same width. The patch fixes the issue by checking the width and adding simple conditions if it's smaller than expected. To test it, you could use a string like `aabb⧸aabb⧸aabb⧸aabb⧸aabb` ('⧸' is *not* an ordinary slash). Previously, the characters were moved on making selections or moving the text cursor. Fixes lxqt/qterminal#1186 NOTE: There is still a rare issue with another kind of character that isn't related to this PR. I might investigate it later.
- Loading branch information
Showing
1 changed file
with
22 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters