[Qt-interest] QFont - Sans Serif and Monospace for all Plattforms

suzuki toshiya mpsuzuki at hiroshima-u.ac.jp
Tue Oct 11 17:08:48 CEST 2011


Hi,

Please let me ask a stupid question, Microsoft Windows bundles
some monospaced San Serif fonts? If there is no, which feature
(sans serif or monospace) should be prioritized?

I think, why "Monospace" works on Linux is, umm, an occasion.
In the fontconfig configuration file, there is a list of monospaced
fonts available on GNU/Linux, like,

<!--
  Monospace faces
 -->
        <alias>
                <family>Bitstream Vera Sans Mono</family>
                <family>DejaVu Sans Mono</family>
                <family>Courier</family>
                <family>Courier New</family>
                <family>Andale Mono</family>
                <family>Luxi Mono</family>
                <family>Cumberland AMT</family>
                <family>Nimbus Mono L</family>
                <family>NSimSun</family>
                <family>FreeMono</family>
                <default><family>monospace</family></default>
        </alias>
You can find that this list includes Serif fonts, like, Courier,
Nimbus Mono L, NSimSun (oops! not free font!). Thus, on GNU/Linux
without Vera Sans Mono nor DejaVu Sans Mono, "Monospace" magic
won't work either.

Regards,
mpsuzuki

Kluger, Peter wrote:
> 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




More information about the Qt-interest-old mailing list