KFontAction constructor can be given a fontListCriteria and based on that a list of items is set as the list of selectable items (KSelectAction::setItems), but KFontAction::createWidget creates a new KFontComboBox, which doesn't use this list and always includes all fonts. Example: KFontAction *action = new KFontAction(KFontChooser::SmoothScalableFonts, this); QWidget *widget = action->requestWidget(this); // widget shows a list of all fonts, including bitmap fonts Reproducible: Always
Can you check, what Qt's font database returns for said font (replace Helvetica with the font you believe is not smoothly scalable): QFontDatabase db; qDebug() << db.isSmoothlyScalable("Helvetica"); KFontChooser filters by this criterium.
Forget what I wrote. I had long planned to add support for KFontChooser::FontListCriteria to KFontComboBox, but had been hold back by the "no new features in kdelibs" rule. Now that I have a valid bug, I can add it for 4.10.
*** Bug 83212 has been marked as a duplicate of this bug. ***
*** Bug 305017 has been marked as a duplicate of this bug. ***
Actually I still had the old diff lying around ... https://git.reviewboard.kde.org/r/106425/
Git commit 5c677ceb397de9b40a050489d1890ac6c9be17d9 by Christoph Feck. Committed on 21/09/2012 at 02:47. Pushed by cfeck into branch 'KDE/4.9'. Allow setting a custom font list in KFontComboBox Required for KFontAction, which allows additional filter criteria. REVIEW: 106425 M +14 -3 kdeui/fonts/kfontcombobox.cpp M +10 -0 kdeui/fonts/kfontcombobox.h http://commits.kde.org/kdelibs/5c677ceb397de9b40a050489d1890ac6c9be17d9
Git commit 2045b132080129af31d54eaa100b641393277d18 by Christoph Feck. Committed on 21/09/2012 at 03:39. Pushed by cfeck into branch 'KDE/4.9'. Fix font list not respected by created KFontComboBox FIXED-IN: 4.9.2 M +1 -0 kdeui/actions/kfontaction.cpp http://commits.kde.org/kdelibs/2045b132080129af31d54eaa100b641393277d18
Git commit 4e22beab48be0799389beb73c041053451fb2112 by Lasse Liehu. Committed on 21/09/2012 at 14:55. Pushed by lliehu into branch 'KDE/4.9'. Replace the font list to use for completion instead of inserting it Fixes bug when bitmap fonts were not shown in the dropdown, but were still used for completion M +1 -1 kdeui/fonts/kfontcombobox.cpp http://commits.kde.org/kdelibs/4e22beab48be0799389beb73c041053451fb2112