PDA

View Full Version : How to register a font with Qt?



Vadi
29th January 2009, 02:54
Hi,

I'd like to ship a font with my program. How can I register it with Qt so it's able to find it?

Vadi
29th January 2009, 03:17
I suspect what I'm looking at is registering the font on every platform individually... but I'm not able to find any information about this.

jpn
29th January 2009, 07:11
See QFontDatabase (static public members).

Vadi
29th January 2009, 13:19
Thanks a bunch, I missed a function there.

Vadi
30th January 2009, 03:06
Another small thing - what is the best way to check if a font is installed? I think it would be better to check if the system already has it and only then use mine.

Is quering QFontDatabase::families and then searching inside the list ok?

Vadi
1st February 2009, 05:33
Nevermind, it's all good. Thanks for your tip!