PDA

View Full Version : Determine system font



niala
21st March 2006, 12:37
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.

wysota
21st March 2006, 13:46
You can use qtconfig tool to set the default font for Qt applications.

Chicken Blood Machine
21st March 2006, 22:45
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.