Bug 432614

Summary: System font not apply for GTK applications
Product: [Plasma] Breeze Reporter: Xander <zackloods0>
Component: gtk themeAssignee: Janet Blackquill <uhhadd>
Status: RESOLVED NOT A BUG    
Severity: normal CC: mail, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.20.5   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Font Name in dialog

Description Xander 2021-02-07 17:02:53 UTC
SUMMARY

There is a bug (i think is) when you set fonts for the system and the gtk apps not takes it, appears like "nameoffont [    ] size" but if i edit this in .gtkrc like "nameoffont Regular size" the apps takes it.

STEPS TO REPRODUCE
1. Change font to another
2. GTK apps not set the font automatically
3. Edit .gtkrc and the apps takes it.

OBSERVED RESULT

GTK apps not save correctly the font

EXPECTED RESULT


SOFTWARE/OS VERSIONS

Arch Linux/KDE Plasma

KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Mikhail Zolotukhin 2021-02-07 17:08:05 UTC
Could you please name the font you are trying to set?
Comment 2 Xander 2021-02-07 17:15:16 UTC
(In reply to Mikhail Zolotukhin from comment #1)
> Could you please name the font you are trying to set?

Yes, sorry i forgot mention it

The font is https://fonts.google.com/specimen/Amaranth
Comment 3 Mikhail Zolotukhin 2021-02-07 20:36:31 UTC
Created attachment 135492 [details]
Font Name in dialog

It seems like Font name in the dialog is somewhat mangled. I think it's a problem with this particular font, so unfortunately I cannot help with that, sorry. 

What's interesting, is that if you delete the "[ ]" thing and save the config, it will use the correct font. Is Google Fonts the only source for Amaranth? If not, it is worth finding alternative .ttf font files somewhere else. If you could find them, please try to use them for configuration.

If not, there is a hacky way I can fix that - remove the brackets from the font string, before writing the configuration, but I'm afraid that can broke some other fonts, that use "[]" in their name. Is that really common practice?
Comment 4 Xander 2021-02-07 22:54:31 UTC
(In reply to Mikhail Zolotukhin from comment #3)
> Created attachment 135492 [details]
> Font Name in dialog
> 
> It seems like Font name in the dialog is somewhat mangled. I think it's a
> problem with this particular font, so unfortunately I cannot help with that,
> sorry. 
> 
> What's interesting, is that if you delete the "[ ]" thing and save the
> config, it will use the correct font. Is Google Fonts the only source for
> Amaranth? If not, it is worth finding alternative .ttf font files somewhere
> else. If you could find them, please try to use them for configuration.
> 
> If not, there is a hacky way I can fix that - remove the brackets from the
> font string, before writing the configuration, but I'm afraid that can broke
> some other fonts, that use "[]" in their name. Is that really common
> practice?

Thank you for the help Mikhail :) I follow your recomendation and I have edited the font file and removed the brackets, now Plasma detect it and works fine.