Bug 389725 - for monospace fonts bold does not work
Summary: for monospace fonts bold does not work
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 5.11.5
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-31 22:03 UTC by Erik Quaeghebeur
Modified: 2018-03-26 21:22 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Quaeghebeur 2018-01-31 22:03:00 UTC
Gentoo stable recently moved to plasma 5.11.5. Since then I have the issue that bold monospace does not show up (for syntax highlighting, e.g., in kate, but also in konsole, I think). In pure Qt programs such as Spyder, the issue does not appear, so it is kde-related. (I wonder how it could be related to plasma, that seems strange.)

It is not the issue reported in Bug 378523, as there are no occurrences of ",Regular" in config files.

Furthermore, in konsole I can choose the bold variant and it will be used (but with the regular variant, text that should be bold is not). In kate, choosing a bold font variant does not change the font to bold (it should, as with a slanted font variant all text becomes slanted).
Comment 1 StanislavArch 2018-02-02 17:53:51 UTC
I can confirm this bug on latest ArchLinux with Plasma 5.11.5, and add important things.

Both in Konsole and in Kate font change picker UI even doesn't have an option to set bold style for Monospace.
BUT when I directly select "Hack" font with bold style in Kate - it works fine and it's persistent after restarting Kate. When I do the same with Konsole - font works only till I restart Konsole(but it's saved correctly in profile anyway - "Font=Hack,12,-1,5,75,0,0,0,0,0,Bold")

Info:
Fonts in system - only default Noto-fonts + ttf-hack
Konsole, Kate - v17.12.1
Comment 2 David Edmundson 2018-02-18 22:26:29 UTC
and you have the issue if you run kate/konsole in openbox?
Comment 3 Erik Quaeghebeur 2018-02-19 09:19:33 UTC
(In reply to David Edmundson from comment #2)
> and you have the issue if you run kate/konsole in openbox?
To be clear: are you asking us to install openbox and test in openbox?
Comment 4 David Edmundson 2018-02-19 09:56:23 UTC
Yes.

More precisely, I'm asking you to test without loading the Plasma QPT.

Unsetting envs
XDG_CURRENT_DESKTOP
and KDE_FULL_SESSION  would also suffice
Comment 5 Erik Quaeghebeur 2018-02-20 16:23:56 UTC
(In reply to David Edmundson from comment #2)
> and you have the issue if you run kate/konsole in openbox?
The issue is *not* present when run in openbox. (It is when run in KDE/Openbox, but presumably that won't surprise you.)
Comment 6 Sergio Torres Soldado 2018-03-04 12:05:51 UTC
This also happens to me with Konsole 17.12.2.

I want to save the profile font to bold. The saved profile at $HOME/.local/share/konsole/ has the right settings:

"""
[Appearance]
ColorScheme=WhiteOnBlack
Font=Hack,9,-1,5,75,0,0,0,0,0,Bold

[General]
Name=New Profile
Parent=FALLBACK/
"""

But after restarting the application the font is always regular. That means that whenever I start the application (normally once for yakuake which uses konsole afaik) I have to set the font again.

I don't know if it is relevant but looking at strace I see:

"""
close(12)                               = 0
openat(AT_FDCWD, "/usr/share/fonts/TTF/Hack-Bold.ttf", O_RDONLY) = 12
fcntl(12, F_SETFD, FD_CLOEXEC)          = 0
fstat(12, {st_mode=S_IFREG|0644, st_size=318100, ...}) = 0
mmap(NULL, 318100, PROT_READ, MAP_PRIVATE, 12, 0) = 0x7f9d84154000
close(12)                               = 0
openat(AT_FDCWD, "/usr/share/fonts/TTF/Hack-Regular.ttf", O_RDONLY) = 12
fcntl(12, F_SETFD, FD_CLOEXEC)          = 0
"""

As expected overwriting the actual font file is the workaround I am currently using..
Comment 7 Ahmad Samir 2018-03-05 17:31:46 UTC
The issue in c#6 is being tracked in bug 391445, let's keep issues separate for now. These reports could all be side effects of the upstream change to QFont, which is tracked in bug 378523. Though they be separate issues...
Comment 8 Stefano 2018-03-24 12:04:28 UTC
I can confirm the same behaviour on Archlinux.

Plasma 5.12.3
Frameworks 5.44.0
Qt 5.10.1

If I choose "Monospace" as font for, eg., konsole or kate, the bold is rendered, but not with every other font. That happens even with DejaVu Sans Mono, which is strange, because in my fontconfig it's the preferred font for Monospace.

Another strange issue is that the Font Styles from which I can choose when I select Monospace don't comprehend the bold style, but only Normal, Italic and Oblique.
Comment 9 Erik Quaeghebeur 2018-03-26 20:56:51 UTC
Qt 5.9.4 fixes this for me. (Gentoo recently updated from 5.7.) So I'm closing this. Anyone with Qt>=5.9.4 that still has an issue (Stefano?): most likely it is another bug, so please file another bug.
Comment 10 Stefano 2018-03-26 21:22:23 UTC
(In reply to Erik Quaeghebeur from comment #9)
> Qt 5.9.4 fixes this for me. (Gentoo recently updated from 5.7.) So I'm
> closing this. Anyone with Qt>=5.9.4 that still has an issue (Stefano?): most
> likely it is another bug, so please file another bug.

I just did it, opened for konsole, although it happens also in kate and kwrite.