Bug 434957 - Underscores are not visible when text has boldface decoration.
Summary: Underscores are not visible when text has boldface decoration.
Status: RESOLVED UPSTREAM
Alias: None
Product: kate
Classification: Applications
Component: part (other bugs)
Version First Reported In: 20.12.2
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-26 07:46 UTC by Atanas Uzunov
Modified: 2023-03-20 17:13 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Missing underscores in Ruby constant (16.83 KB, image/png)
2021-03-26 07:46 UTC, Atanas Uzunov
Details
Underscores visible (with Hack font) (48.72 KB, image/png)
2021-03-26 13:21 UTC, Jan Paul Batrina
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Atanas Uzunov 2021-03-26 07:46:42 UTC
Created attachment 137068 [details]
Missing underscores in Ruby constant

Underscores are not visible on text elements with boldface decoration (for ex. constants in Ruby) using default Kate font settings on Windows.

SOFTWARE/OS VERSIONS
Windows: Windows 10 20H2
KDE Frameworks Version: 5.79.0 
Qt Version: 5.15.2
Comment 1 Jan Paul Batrina 2021-03-26 13:21:04 UTC
Created attachment 137085 [details]
Underscores visible (with Hack font)

Does changing the font resolve the issue? I can see the underscores here (with the Hack font and I also tested with Courier which IIRC is the default font) but I remember experiencing the same bug some other time before.
Comment 2 Atanas Uzunov 2021-03-26 16:29:50 UTC
Yes, changing the default font (Courier New) to other one, resolves the issue. Also changing the font size resolves it. However, with Courier New there are certain other sizes that causes the underscores to disappear or to be displayed with incorrect thickness (too thin).
Comment 3 Waqar Ahmed 2022-08-17 20:24:36 UTC
Is this still reproducible?
Comment 4 Atanas Uzunov 2022-08-19 10:11:46 UTC
(In reply to Waqar Ahmed from comment #3)
> Is this still reproducible?

Yes, it is still reproducible in latest Kate 22.04.1 in Windows, with both Courier and Courier New fonts. When you press Ctrl + Scroll the mouse wheel, you could easily notice that on some font sizes the underscores disappear.
Comment 5 Waqar Ahmed 2022-08-19 10:24:52 UTC
Does it improve if you increase the line height? See (Configure Kate... -> Appearance -> General -> Line Height Multiplier)
Comment 6 Atanas Uzunov 2022-08-19 10:43:06 UTC
Yes, increasing from 1.0 -> 1.1 or more, seems to solve the problem.
Comment 7 Waqar Ahmed 2022-08-19 11:53:35 UTC
can you try one more thing, set the following environment variable before launching kate via cmd line

set QT_QPA_PLATFORM=windows:fontengine=freetype

On linux freetype font engine is used, so maybe the fault is in whatever fontengine that is being used on Windows.
Comment 8 Atanas Uzunov 2022-08-22 11:30:56 UTC
Using:
set QT_QPA_PLATFORM=windows:fontengine=freetype
does not seem to have effect on that issue
Comment 9 Waqar Ahmed 2023-03-20 17:13:29 UTC
This can't be fixed anymore on our side. 

One can always use a different font height to avoid the issue. The real issue must be fixed elsewhere