https://bugs.kde.org/show_bug.cgi?id=420287
Ahmad Samir <a.samir...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Latest Commit| |https://commits.kde.org/kwi | |dgetsaddons/b52622993b45a61 | |c4060d19517a5c3b833b3b854 Resolution|--- |FIXED Status|REPORTED |RESOLVED Version Fixed In| |5.70 --- Comment #1 from Ahmad Samir <a.samir...@gmail.com> --- Git commit b52622993b45a61c4060d19517a5c3b833b3b854 by Ahmad Samir. Committed on 19/04/2020 at 11:05. Pushed by ahmadsamir into branch 'master'. [KFontChooser] Make styleIdentifier() more precise by adding font styleName Summary: styleIdentifier() tries to get the correct font style based on weight, style, and stretch; this "styleID" could be the same for different font styles in the same family, and it worked in most cases because "Regular"-like styles usually are ordered first in the family styles list from QFontDatabase. However this breaks for font families that provide many font styles, e.g. Noto Sans, where "SemiCondensed" comes first in the list. Make it more precise by adding the font "styleName" property to the "styleID" we concatenate, this makes it more precise. Also handle empty styleName font prop. (we strip it on purpose, see KConfigGroupGui::writeEntryGui() for more details), try to pick the correct one so that we highlight it in the font style list view. Test Plan: kfontchooserdialogtest app, with the initial font set to "Noto Sans", before this change it'd select "SemiCondensed"; now it selects "Regular" as expected. FIXED-IN: 5.70 Reviewers: #frameworks, dfaure, cfeck, bport Reviewed By: dfaure Subscribers: ndavis, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D28974 M +27 -2 src/kfontchooser.cpp M +1 -1 tests/kfontchooserdialogtest.cpp https://commits.kde.org/kwidgetsaddons/b52622993b45a61c4060d19517a5c3b833b3b854 -- You are receiving this mail because: You are watching all bug changes.