PDA

View Full Version : Set Font Directory how to ?



praveen_g
13th November 2009, 09:30
Hi,

Qt searches Fonts from Operating System's FONTS directory, can I include fonts from a specific directory instead of OS Fonts directory.

cann somebody help me out ?

thanks in advance

yogeshgokul
13th November 2009, 09:37
Qt searches Fonts from Operating System's FONTS directory, can I include fonts from a specific directory instead of OS Fonts directory.

This works for Win/Mac not for X11.

QFontDatabase::addApplicationFont()

praveen_g
13th November 2009, 10:07
Thanks for your reply.

Could you educate how to use this, when I tried to use this with

QString Fpath = "C:/Fonts/Mangal";
QFontDatabase::addApplicationFont(Fpath);

this returns a " -1 ", could you educate me on this front.

thanks

praveen_g
13th November 2009, 10:22
Thanks Yogesh got resolved.

I copied the font to the application folder and the issue got resolved.

can you tell me how to use this font with QFont.

praveen_g
13th November 2009, 10:28
Got it thanks Yogesh.

thanks a ton ...

praveen_g
15th November 2009, 12:26
can somebody tell me how to do the same in LINUX ?