Extend character clipping by grouping it with spaces

Authored by mglb on Feb 6 2019, 10:52 AM.



Group spaces following any non-wide character with the character. This
allows for rendering ambiguous characters with wide glyphs without
clipping them. Characters are still clipped when followed by another
visible character.

BUG 401298

Test Plan
  • Display: ⛰ ⛩


  • Install Font Awesome or other font with square icons in Private Use Area
  • Pick some icons using KCharSelect or similar tool (or copy this:      )
  • Put space after each icon and display them in Konsole

Actual result:
Only left half of icons is rendered
Expected result:
Full icon should be rendered (it can be clipped on top or bottom though)

Diff Detail

R319 Konsole
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
mglb requested review of this revision.Feb 6 2019, 10:52 AM
mglb created this revision.

The output looks fine and I don't see anything wrong w/ the code. However, when selecting one of these wide chars, the "right half" selection grabs the space while the "left half" selection grabs the entire character. If that's something that can't be fixed or is the preferred way to handle that, then OK.

mglb added a comment.Feb 15 2019, 6:38 PM

I think it should be as it is now - user will see that a space, not a symbol, is selected.

hindenburg accepted this revision.Feb 16 2019, 2:45 PM

I don't see any issues w/ this. The only thing that might be fixed later could be when moving the cursor, the full image/character would be highlighted (terminator does this).

This revision is now accepted and ready to land.Feb 16 2019, 2:45 PM
This revision was automatically updated to reflect the committed changes.