https://bugs.kde.org/show_bug.cgi?id=523745

            Bug ID: 523745
           Summary: Nerd Font icon glyphs get clipped when typing
    Classification: Applications
           Product: konsole
      Version First 26.04.3
       Reported In:
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: font
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 194780
  --> https://bugs.kde.org/attachment.cgi?id=194780&action=edit
Clipping with 1 character

DESCRIPTION
Nerd Font icon glyphs (e.g. Fedora logo, home folder icon) in a shell prompt
get vertically clipped on the line immediately above the cursor while typing,
but only when characters are typed slowly enough that each keystroke triggers
its own repaint. The clipping does not occur with strictly monospaced ("Mono")
Nerd Font variants, and disappears if the current input line is cleared.

STEPS TO REPRODUCE
1. Set Konsole profile font to a non-"Mono" Nerd Font variant (e.g.
JetBrainsMono Nerd Font or MesloLGS NF).
2. Use a shell prompt that renders icon glyphs (distro logo, folder icon, etc.)
on the line above the current input line (e.g. Powerlevel10k).
3. At an empty prompt, type a single character slowly (e.g. `f`) and pause.
4. Observe the icon glyph on the line directly above the cursor.
5. Delete the character and repeat, typing a few more characters one at a time
with a brief pause between each.

OBSERVED RESULT
- The icon glyph on the line immediately above the cursor is partially
clipped/cut off after certain individual keystrokes (in testing, this
reproduced consistently on the 1st and 5th typed characters, though the exact
position appears tied to which icon's horizontal position aligns with the
advancing cursor column).
- If the same characters are typed quickly in succession (e.g. typing
"fastfetch" rapidly rather than one key at a time with pauses) the clipping
does **not** occur.
- Deleting the typed characters back to an empty line immediately restores the
icon to its correct, uncut appearance.
- Switching to a strictly monospaced ("Mono") build of the same font family
eliminates the clipping entirely (icons render smaller, but never clip).
- The artifact is not cleared by resizing or scrolling the window (ruling out
the known fractional-scaling redraw issues tracked in Bug 373232 / Bug 406770 —
this appears to be a distinct issue).

EXPECTED RESULT
Icon glyphs above the cursor line should render correctly regardless of typing
speed or which specific character/column is being edited.

SUSPECTED CAUSE
Nerd Font icon glyphs are intentionally drawn wider than a single cell and
their rendering can overflow the cell's bounding box, including overlapping
vertically into the row above. Konsole appears to repaint only a narrow,
per-keystroke damage rectangle scoped to the edited line (for performance)
rather than the full ink bounds of adjacent glyphs. When a single keystroke
triggers an isolated, narrow repaint, any overflowing icon ink from the line
above that falls within/adjacent to that repaint rectangle gets clipped to the
rectangle boundary instead of being fully redrawn. Rapid successive keystrokes
appear to get coalesced by Qt into a single larger repaint pass, which is large
enough to redraw the icon glyph correctly — explaining why fast typing avoids
the bug. Deleting characters likely triggers a wider clear-and-redraw of the
line, which also incidentally fixes the glyph.

This does not reproduce with strictly monospaced glyphs, since they never
extend past their own cell and therefore are never affected by the narrow
repaint boundary.

SOFTWARE/OS VERSIONS
- OS: Fedora Linux 44 (KDE Plasma 6)
- Konsole version: 26.04.3
- KDE Frameworks version: 6.7.3
- Qt version: 6.11.1
- Shell: zsh 5.9 (x86_64-redhat-linux-gnu)
- Display scaling: 1.25 (fractional) — confirmed not the cause, see below

ADDITIONAL INFORMATION
This is distinct from the previously reported fractional-scaling
horizontal-line artifacts (Bug 373232, Bug 406770): those are cleared by
scrolling/resizing and are not specific to icon glyphs, whereas this issue is
unaffected by scrolling/resizing and only affects glyphs that visually overflow
their cell.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to