Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, March 2007
Change all usings of one font to other in Qt4.2 application


Message 1 in thread

Hi!

I found that Qt4.2.2 by default uses font "Luxi Sans" for many internal roles: 
in tooltips, in file dialogs and more. In my target system I have'nt this 
font for every used sizes (or not for russian encodings, I don't now 
exactly). And i have empty labels instead of russian text. Some of this 
troubles i can evade by using other GUI-style. But not all.

I want to use other font instead of "Luxi Sans". But I don't found way to make 
this. I can change font for tooltips. But for file dialog.... hm.... And 
more....

I can setup X to replace all usings font Luxi Sans to other (and at this time 
I made this). But I don't want to make this setup for every system I'll use 
my application. :)
-- 
 [ signature omitted ] 

Message 2 in thread

Hi,

> I found that Qt4.2.2 by default uses font "Luxi Sans" for many internal roles: 
> in tooltips, in file dialogs and more. In my target system I have'nt this 
> font for every used sizes (or not for russian encodings, I don't now 
> exactly). And i have empty labels instead of russian text. Some of this 
> troubles i can evade by using other GUI-style. But not all.

Then Qt shouldn't be using that font in the first place. If it does, it 
could be a bug in Qt, or maybe your graphics system is misconfigured and 
tells Qt font "Luxi Sans" is available in sizes or for characters that 
are actually not supported.

Which exact Linux distribution is this? Have you somehow modified the 
graphics subsystem (you do seem to have modified it since you have 
modified the X setup)? Could you try on another system, where the 
graphics subsystem has not been modified?

Finally, what did you try to set application default font? 
QApplication::setFont()?

--
 [ signature omitted ] 

Message 3 in thread

Hi!
On Thursday 01 March 2007 19:16, Dimitri wrote:
> Hi,
>
> > I found that Qt4.2.2 by default uses font "Luxi Sans" for many internal
> > roles: in tooltips, in file dialogs and more. In my target system I
> > have'nt this font for every used sizes (or not for russian encodings, I
> > don't now exactly). And i have empty labels instead of russian text. Some
> > of this troubles i can evade by using other GUI-style. But not all.
>
> Then Qt shouldn't be using that font in the first place. If it does, it
> could be a bug in Qt, or maybe your graphics system is misconfigured and
> tells Qt font "Luxi Sans" is available in sizes or for characters that
> are actually not supported.
>
> Which exact Linux distribution is this? Have you somehow modified the
> graphics subsystem (you do seem to have modified it since you have
> modified the X setup)? Could you try on another system, where the
> graphics subsystem has not been modified?
I think about this. But this Linux system build not by my and I haven't info 
about it internal structure. 
One thing I can say - Qt3.3.3 application works in this system properly. With 
russian language too.
How I can get info about available-font-list in Qt?

>
> Finally, what did you try to set application default font?
> QApplication::setFont()?
I've try this. It helps. But I dislike hard-coded styles.

Thanks.
-- 
 [ signature omitted ] 

Message 4 in thread

Hi,

> I think about this. But this Linux system build not by my and I haven't info 
> about it internal structure. 
> One thing I can say - Qt3.3.3 application works in this system properly. With 
> russian language too.
> How I can get info about available-font-list in Qt?

You can at least tell us which distribution this, can't you? If you 
don't even know which exact distribution this is, there's not much we 
can do to help.

>> Finally, what did you try to set application default font?
>> QApplication::setFont()?
> I've try this. It helps. But I dislike hard-coded styles.

Sure, I usually dislike that as well .But then why did you write the 
following?
	I want to use other font instead of "Luxi Sans".
If you want to use another font, you do have to hard-code it somehow, 
don't you? If not could you explain what you're after in more detail?

--
 [ signature omitted ] 

Message 5 in thread

Dimitri ÐÐÑÐÑ:
> Hi,
> 
>> I think about this. But this Linux system build not by my and I 
>> haven't info about it internal structure. One thing I can say - 
>> Qt3.3.3 application works in this system properly. With russian 
>> language too.
>> How I can get info about available-font-list in Qt?
> 
> You can at least tell us which distribution this, can't you? If you 
> don't even know which exact distribution this is, there's not much we 
> can do to help.
> 
 From its previous posts I do the assumption that distribution is MCBC.
IIRC MCBC based on RH ~ 6.0.

--
 [ signature omitted ] 

Message 6 in thread

On Tuesday 06 March 2007 08:38, Nikolay Moskvichev wrote:
> Dimitri ÐÐÑÐÑ:
> > Hi,
> >
> >> I think about this. But this Linux system build not by my and I
> >> haven't info about it internal structure. One thing I can say -
> >> Qt3.3.3 application works in this system properly. With russian
> >> language too.
> >> How I can get info about available-font-list in Qt?
> >
> > You can at least tell us which distribution this, can't you? If you
> > don't even know which exact distribution this is, there's not much we
> > can do to help.
>
>  From its previous posts I do the assumption that distribution is MCBC.
> IIRC MCBC based on RH ~ 6.0.
Yes. It has ELK window manager (I don't now what is it:)
It looks like windows 95. 

-- 
 [ signature omitted ] 

Message 7 in thread

Hi,

> Yes. It has ELK window manager (I don't now what is it:)
> It looks like windows 95. 

Ah, OK. Note that red Hat 6.0 is pretty old...

Otherwise don't worry about the window manager, it is usually irrelevant 
for such issues.

Finally, we would still answers to the previous questions to start helping.

--
 [ signature omitted ] 

Message 8 in thread

On Saturday 03 March 2007 00:37, Dimitri wrote:

>
> Sure, I usually dislike that as well .But then why did you write the
> following?
> 	I want to use other font instead of "Luxi Sans".
> If you want to use another font, you do have to hard-code it somehow,
> don't you? If not could you explain what you're after in more detail?
Now I have solve this problem by correcting config file /etc/fonts/local.conf 
and adding rule to replace all usings font "Luxi Sans" to "Helvetica". 
I thing this is no hard-coding? :) But i don't like this method because it 
changes system-wide settings, not only for my app.
I don't wont to use QApplication::setFont() because in other systems i have 
good looks fonts. 

I don't know why Qt4 uses this font with incorrect sizes (maybe) while other 
applications don't. I thing it may be configured but in qconfig i don't found 
these settings.

Then, why qtconfig requires qt3support for building????? :) WTF???

>
> --
> Dimitri
>

-- 
 [ signature omitted ]