[Qt-interest] QFont - Sans Serif and Monospace for all Plattforms
Atlant Schmidt
aschmidt at dekaresearch.com
Tue Oct 11 15:33:24 CEST 2011
Peter:
Are you sure you're not looking for QFont::setStyleHint() instead
of QFont::setFamily("Monospace")?
Atlant
enum QFont::StyleHint
Style hints are used by the font matching algorithm to find an appropriate default family if a selected font family is not available.
Constant Value Description
QFont::AnyStyle ? leaves the font matching algorithm to choose the family. This is the default.
QFont::SansSerif Helvetica the font matcher prefer sans serif fonts.
QFont::Helvetica 0 is a synonym for SansSerif.
QFont::Serif Times the font matcher prefers serif fonts.
QFont::Times ? is a synonym for Serif.
QFont::TypeWriter Courier the font matcher prefers fixed pitch fonts.
QFont::Courier ? a synonym for TypeWriter.
QFont::OldEnglish ? the font matcher prefers decorative fonts.
QFont::Decorative OldEnglish is a synonym for OldEnglish.
QFont::Monospace ? the font matcher prefers fonts that map to the CSS generic font-family 'monospace'.
QFont::Fantasy ? the font matcher prefers fonts that map to the CSS generic font-family 'fantasy'.
QFont::Cursive ? the font matcher prefers fonts that map to the CSS generic font-family 'cursive'.
QFont::System ? the font matcher prefers system fonts.
-----Original Message-----
From: qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com [mailto:qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com] On Behalf Of Kluger, Peter
Sent: Tuesday, October 11, 2011 08:39
To: qt-interest at qt.nokia.com
Subject: [Qt-interest] QFont - Sans Serif and Monospace for all Plattforms
Hi all,
i have a question regarding Fonts, is there any sophisticated way to
ensure Qt uses a Monospace/Sans Serif Font for all Plattforms (especially Windows and Unix).
It seems like QFont::setFamily("Monospace") does the magic for Linux but its
Still with Serif for Windows.
Couldn't find anything in the documentation, hope someone here can help.
Thanks in advance,
Peter
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest
Click https://www.mailcontrol.com/sr/AgqVZ3kG6pvTndxI!oX7UhH!QQfW4VBQyBVdBb8x7B6YMrlIzCR7F5nnEtCtJ4uU!XVREiuPj!pmYIqzE2R4VA== to report this email as spam.
This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.
Thank you.
Please consider the environment before printing this email.
More information about the Qt-interest-old
mailing list