Results 1 to 3 of 3

Thread: Determine system font

  1. #1
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Determine system font

    Hi,

    I am using QT4.1 for developping a cross platform (Windows & Linux) GUI interface to a GPS receiver. I am having difficulties with setting up a font for either OS.

    Is it possible to get the system font on Windows and on Linux (from KDE or from GNOME). I also need a font able to display greek characters, such as lambda, delta and so on.

    At present, the windows font is nice, but the Linux font is hardly readable and greek chars are not present.

    Tx for any help.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Determine system font

    You can use qtconfig tool to set the default font for Qt applications.

  3. #3
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Thanked 42 Times in 37 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Determine system font

    Quote Originally Posted by niala
    Hi,

    I am using QT4.1 for developping a cross platform (Windows & Linux) GUI interface to a GPS receiver. I am having difficulties with setting up a font for either OS.

    Is it possible to get the system font on Windows and on Linux (from KDE or from GNOME). I also need a font able to display greek characters, such as lambda, delta and so on. For other DEs and platforms - you're on your own!

    At present, the windows font is nice, but the Linux font is hardly readable and greek chars are not present.

    Tx for any help.
    Qt should automatically pick up the correct system font on Windows. Can you confirm for sure if this is happening or not? On UNIX... well... it's tricky. I have some code that does it for GNOME and KDE if you are interested.

    Alternatively of course, you can use qtconfig as Wysota said, but I prefer my apps to respect the users desktop settings and I certainly don't want my users to have to use another tool to configure their application fonts.
    Save yourself some pain. Learn C++ before learning Qt.

Similar Threads

  1. Replies: 3
    Last Post: 20th December 2008, 00:12
  2. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  3. Qt renders wrong font
    By durbrak in forum Qt Programming
    Replies: 8
    Last Post: 2nd November 2006, 14:36
  4. Determine if a font can display a character
    By jrideout in forum Qt Programming
    Replies: 1
    Last Post: 19th October 2006, 10:33
  5. how to use user define font
    By numen in forum Qt Programming
    Replies: 1
    Last Post: 20th April 2006, 10:25

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.