https://bugs.kde.org/show_bug.cgi?id=420287
--- Comment #3 from Ahmad Samir <a.samir...@gmail.com> --- Git commit 0325d698181055cdaaa93b24ee80172132822d35 by Ahmad Samir. Committed on 05/05/2020 at 13:00. Pushed by ahmadsamir into branch 'master'. [Fonts KCM] Remove redundant nearestExistingFont() Summary: It seems that nearestExistingFont() gets the same result as `fc-match font-name`, which is basically the sans serif default font on the system; this seems redundant as KFontChooser will fallback to selecting the first font family in the list if the initial font it was called with doesn't exist _and_ KFontChooser always puts "Sans Serif", "Serif" and "Monospace" at the top of the list. Removing nearestExistingFont() solves the issue in bug 420287 as the font it returns will have the styleName property set, after we went to so much trouble to clear that property so that setBold() can work. Test Plan: Before the patch: - In kdeglobals [General] set: fixed=Blah Mono,12,-1,5,50,0,0,0,0,0 toolBarFont=Bogus Serif,12,-1,5,50,0,0,0,0,0 - Load the fonts KCM, and open the font dialog for Fixed and Toolbar, in both cases the default "sans serif" font on the system is selected, in my case it's "DejaVu Sans" Apply the patch and repeat, the "Sans Serif" entry is selected, which is an alias to "DejaVu Sans" on my system. Reviewers: #plasma, bport, ngraham Reviewed By: bport, ngraham Subscribers: ngraham, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D29155 M +0 -66 kcms/fonts/fonts.cpp https://commits.kde.org/plasma-desktop/0325d698181055cdaaa93b24ee80172132822d35 -- You are receiving this mail because: You are watching all bug changes.