Steps to reproduce: 1. Open any source code file with bold elements (e.g. keywords). 2. Go to Options -> Kate settings -> Fonts and colors -> Font 3. Change the font (e.g. to Liberation Mono Regular) or just change the size of the font. 4. Apply the font. All bold and italic elements are now displayed with regular font weight. Kate 16.12.1, KDE Plasma 5.9, Arch Linux 64-bit kernel 4.9.6
The problem here is that the font does not support bold in all sizes. I for example only get bold with Liberation Mono in sizes 11 and up, but with DejaVu Sans Mono I get bold already at size 10. Some fonts don't even have bold with the mono variant.
I think it is in fact a Kate bug. If I edit ~/.config/kateschemarc: [Normal] Font=Liberation Mono,9,-1,5,50,0,0,0,0,0,Regular dummy=prevent-empty-group to [Normal] Font=Liberation Mono,9,-1,5,50,0,0,0,0,0, dummy=prevent-empty-group then bold and italic elements are again displayed correctly at all font sizes. Seems like "Regular" forces Kate to display everything in regular weight.
I could not get it to show bold by removing "Regular" at the end of the line...
This indeed is rather a font issue. We don't do any magic with the font. If the font doesn't give us "bold" even though we request it, then we cannot do anything about it. Do you have this issue with all fonts? Or do you have this issue with the same font also in other KDE or Qt applications? Can you reproduce this in Qt Creator? Please try this. For now, I will close this issue since without further infos we have not really a concrete clue what to do or whether there really is an issue in Kate. Please report back here for the results with Qt Creator, though. Thanks!
(In reply to Dominik Haumann from comment #4) > This indeed is rather a font issue. We don't do any magic with the font. If > the font doesn't give us "bold" even though we request it, then we cannot do > anything about it. > > Do you have this issue with all fonts? Or do you have this issue with the > same font also in other KDE or Qt applications? Can you reproduce this in Qt > Creator? Please try this. > > For now, I will close this issue since without further infos we have not > really a concrete clue what to do or whether there really is an issue in > Kate. > > Please report back here for the results with Qt Creator, though. Thanks! Yes, I have this issue with all fonts in Kate. I have tested Qt Creator - no problems there. All monospaced fonts (including Liberation Mono) work at all sizes, keywords can be made bold. As I have written before, removing trailing "Regular" from kateschemarc fixes the problem.
I have a similar issue, bold does not work, but italic does. It appeared not too long ago. (I had a recent upgrade of Plasma to 5.11. Frameworks are at 5.40. Applications are at 17.08.) If I choose a proportional (non-monospace) font like Noto Sans, bold does work. My kateschemarc does not contain the trailing ‘Regular’ in the normal section. Let me know if this is clearly a different issue and I should file a separate bug.
Any time you change the font to a mono font, the bold and italics stops working. If I remove ,Regular where font= is specified in kateschemarc, then the problem goes away. This is still a bug in kate 17.12.3
*** This bug has been marked as a duplicate of bug 378523 ***