Bug 384053

Summary: Light font weight used for some tokens, cannot be changed
Product: [Frameworks and Libraries] frameworks-ktexteditor Reporter: EP <bertyfogs+kdebugs>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: nate
Priority: NOR    
Version: 5.37.0   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: example1
example2 no bold for keywords

Description EP 2017-08-26 15:39:52 UTC
Created attachment 107534 [details]
example1

This happens when the font used has a light weight variant (e.g. Roboto Mono, Source Code Pro). I don't know if it is supposed to be so, but I find it very hard to read and there is no way to change it in the settings.
Comment 1 Nate Graham 2017-08-27 14:07:33 UTC
Can you explain in more detail what the problem is? Are the variable names too light to read?
Comment 2 EP 2017-08-27 16:48:28 UTC
Some fonts may come in many different weights (https://en.wikipedia.org/wiki/Font#Weight). 
For some reason the editor chooses the light font weight for some tokens (variables, control flow keywords, object field access on the screenshot).
My settings are:
- Roboto Mono is the default monospace font (via fontconfig rules)
- KWrite:Fonts & Colors:Font:Monospace:Normal

While writing this I've found that if I set a different font via KWrite settings then everything will use the selected weight, even the tokens which should be bold (e.g. keywords). Looks like it may be related to this. Could it be that my font configuration breaks the text rendering somehow? Can someone try to reproduce this?
Comment 3 EP 2017-08-27 16:52:09 UTC
Created attachment 107546 [details]
example2 no bold for keywords
Comment 4 Nate Graham 2017-08-27 16:53:17 UTC
Thanks for the info.
Comment 5 Christoph Feck 2017-09-04 15:36:32 UTC

*** This bug has been marked as a duplicate of bug 383665 ***