Bug 369151

Summary: kde-gtk-config erroneously insert foundry name into font name for GTK 3 config
Product: [Applications] systemsettings Reporter: Eugene Shalygin <eugene.shalygin+bugzilla.kde>
Component: kcm_gtkAssignee: Aleix Pol <aleixpol>
Status: RESOLVED FIXED    
Severity: normal CC: aleixpol, nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.18.0

Description Eugene Shalygin 2016-09-21 10:25:09 UTC
When a font, which is selected in kde-gtk-config, is available from two or more sources, the app saves its name into the configuration file with a suffix, and this notation seems to be not recognized by GTK resulting in "SansSerif" font being used instead of the selected one.

Example:
gtk-font-name=Cantarell [ABAT] 9
 
Removing "[ABAT]" satisfies GTK and it uses Cantarell then. 

Reproducible: Always

Steps to Reproduce:
1. Find or install a font, available in two variants with different foundry names or one with foundry name and the other one without.
2. Select this font in kde-gtk-config and save configuration
3. open ~/.config/gtk-3.0/settings.ini and notice foundry name or '[unknown]' in the gtk-font-name value.
4. Launch a GTK 3 application.

Actual Results:  
The application uses "SansSerif" font for UI. 

Expected Results:  
The selected font is used for UI.