PDA

View Full Version : Fonts used by external program invoked from qt application



drawat
14th September 2010, 09:09
Hi,

I am runnign an external program(assistant) from my qt code. Before invokling this program I am setting a particular font for the QApplication.
But this program does not use the same font I set for my application.

Any insight?

wysota
14th September 2010, 16:31
This is a different process, it won't inherit things such as font settings for your application. As far as I remember you can set a default font for an application by passing it a -font <font_description> arguments on the command line. Just don't ask me how the font description should look like. This is probably an X11 setting.

drawat
16th September 2010, 11:33
Thanks for the reply.

specifying -font also did not force it to pick the correct font. I cross-checked it with xterm and it worked for it.

So, I have left with the option of fontconfig. I can specify the fonts directory in a custom .fonts.conf file, and ship this file with installation. But, xml does not understand environment variables which I will need for the fonts directory. Any insight into this?