Created attachment 134268 [details] Line numbers cut off SUMMARY Line numbers in line number area are not displayed properly on windows if there are more than 1 digit. You see the last digits but the first one is slightly cut off. STEPS TO REPRODUCE 1. Open kate with a file that has line > 10 2. See that the first digit is cut off OBSERVED RESULT 1.5 digits displayed out of 2 :/ EXPECTED RESULT 2 out of 2 digits clearly visible SOFTWARE/OS VERSIONS Windows: Windows 10 Pro Version 2004, Build 19041.685 Kate version: 20.08.1 KDE Frameworks Version: 5.74.0 Qt Version: 5.15.1 ADDITIONAL INFORMATION Installed from Windows Store
Which font do you use and what font size?
Courier New, Size 9.0 Increasing the size makes it a bit better but the issue remains. Changing the font to Consolas resolves the issue completely.
This only seems to happen with Courier New, I have tried other fonts but can't reproduce. A work around is to use "Icon Border". Also, this happens regardless of OS, reproducible on Linux as well. As a suggestion, We should default to some other font on windows to avoid this problem.
I'm having this issue on Windows with the Hack font.
Which version of Kate are you using and font size?
Created attachment 135987 [details] Issue with Hack 12 pt, Windows The problem persists after updating to 20.12.2 (despite the fact that doing so overwrote my font settings and removed my schema customizations :/). The font size is 12. But I have only seen this issue on Windows so far. The default Kate font on Arch Linux is Hack and I have no such issue there.
I think we use the wrong function to compute the sizes for the line numbers, will alter that.
Git commit cf52ca1ff83fdf7db3b709d7b2dd93d7884754da by Christoph Cullmann. Committed on 21/02/2021 at 12:03. Pushed by cullmann into branch 'master'. use correct function to determine with of line number characters tested locally, this yields often 1 or 2 extra pixels compared to what we did before M +2 -2 src/view/kateannotationitemdelegate.cpp M +3 -4 src/view/kateviewhelpers.cpp https://invent.kde.org/frameworks/ktexteditor/commit/cf52ca1ff83fdf7db3b709d7b2dd93d7884754da