[Qt-interest] QFont::defaultFamily() takes ridiculous share of CPU time, but only on Windows

Philipp Münzel mailing-lists at philippmuenzel.de
Thu Apr 7 16:00:14 CEST 2011


Should have mentioned that:
The "Inconsolata" font is of course present on both systems, and the renderings look identical, pixel by pixel. 

This also came to my mind, but I can rule it out. What is strange is what QFont::defaultFamily does, according to documentation
"Returns the family name that corresponds to the current style hint."

But why does it have to look for a family, when I clearly specified the font name, and it apparently loads exactly this font (otherwise the rendering would look different on Windows)?

Regards,
Philipp


On 07.04.2011 15:33 "Atlant Schmidt" <aschmidt at dekaresearch.com> wrote:
> Philipp:
> 
> > How and why gets QFont::defaultFamily() called
> > in the scenario described above?
> 
>   Perhaps your Linux machine has the "Inconsolata" font
>   and your Windows machine doesn't, so Qt spends a lot
>   of time deciding which fall-back font to use?
> 
>   



More information about the Qt-interest-old mailing list