Drop-in replacement for QFontComboBox, better previews

Chusslove Illich caslav.ilic at gmx.net
Tue May 6 10:30:37 BST 2008


By displaying the font previews using the font names themselves,
QFontComboBox is lacking somewhat especially on localized desktops with non-
Latin1 characters. E.g. for a long time I had to pick-n-try to see if a
given font really has Cyrillic support or not.

So I propose a KFontComboBox which reimplements the preview painter so that
also shows text sample in desktop's language. A sample of the original
QFontComboBox appearance and the proposal for that of KFontComboBox is given
here:

  http://caslav.gmxhome.de/image/kde4-qfontcombobox-01-c.png
  http://caslav.gmxhome.de/image/kde4-kfontcombobox-01-c.png

(so it can be seen that English too will benefit from the new preview for
some crazier fonts.)

The baseline font size is same for both shots. The old preview multiplies it
more for the font name, while the new preview multiplies it less due to
presence of the sample text (which is of the baseline font size).

The sample text color is chosen as KColorScheme::InactiveText, for the font
names to be well distinct when quickly browsing.

(A little extra is to also allow translating some font names, namely the
generic "Serif", "Sans Serif" and "Monospace".)

-- 
Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kfontcombobox.h
Type: text/x-c++hdr
Size: 1765 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080506/ca61276b/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kfontcombobox.cpp
Type: text/x-c++src
Size: 9981 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080506/ca61276b/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080506/ca61276b/attachment.sig>
-------------- next part --------------
_______________________________________________
kde-usability mailing list
kde-usability at kde.org
https://mail.kde.org/mailman/listinfo/kde-usability


More information about the kde-core-devel mailing list