-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visual problem when part of a string containing '⧸' (U+29F8) is selected #1186
Comments
Thanks for adding it again. I add your comment in the previous report that mysteriously vanished: "When selecting a name that contains a '⧸', the whole string moves to the right and a space inserted to the right or left of the selection for every '⧸' selected." I also add my comments in that report : This may not be an issue in QTerminal, because characters like "U+29F8" contradict the monospace property (= fixed-width). It happens in Konsole too, but in a worse way. |
XTerm cheats but adding a margin after such characters to make them like fixed-width characters, while we use This screenshot shows xterm on the top and QTerminal below it: QTerminal (actually, A workaround may be to use our own version of EDIT: |
Found a simple way of "cheating". It makes QTerminal exactly like XTerm and gnome-terminal in this regard: Will make a PR soon. EDIT: The PR is made at lxqt/qtermwidget#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.
[The original report is now invisible to anyone other than me when I'm signed in.]
I've found some other characters that cause the problem:
ร ว ว เ ส ย ง
There must be many others.
The text was updated successfully, but these errors were encountered: