[Development] System-wide font preferences for monospace font

Aleix Pol aleixpol at kde.org
Thu Jun 20 19:57:57 CEST 2013


On Wed, May 15, 2013 at 5:40 PM, Jan Kundrát <jkt at flaska.net> wrote:

> On Thursday, 9 May 2013 22:41:07 CEST, Jan Kundrát wrote:
> > However, both KDE and Gnome's settings each include more data,
> > including the font size and options like bold, italic etc. Are
> > these also handled by fontconfig, so that when I ask for a
> > "Monospace" I always get the font with a correct size and
> > "style"?
>
> It doesn't seem so, based on my reading of the docs. If I am right, this
> means that there is some value in having a cross-platform way of obtaining
> "user's preferred fixed-width font, including the font size". For example
> on this machine, I have a "DejaVu Sans 10" as the default font but
> "Monospace 9", whatever it actually is, as the fixed width font. If I
> relied on fontconfig, I'd get a 10pt "Monospace" which is too big for my
> preferences.
>
> Am I right here?
>
> Cheers,
> Jan
>
> --
> Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>

Hi,
Sorry for reviving this thread but it didn't reach any conclusion and we
still need this to move forward.

I'd like to add a QStandardFonts class (e.g. [1], completely open to
discussion) and a FixedFont to the QPlatformThemes::Font enum.
Do you guys would be interested in me working in this direction?

I'd say it's interesting because it lets applications integrate with what
the system is supposed to look like. Qt already is doing this for widgets
internally, giving (some of) that data will definitely be useful for
applications as well.

Aleix

[1]
class QStandardFonts
{
public:
    QFont defaultFont();
    QFont fixedFont();
    QFont toolBarFont();
    QFont menuFont();
    QFont windowTitleFont();
    QFont smallestReadableFont();
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130620/c4b180b1/attachment.html>


More information about the Development mailing list