[Qt-interest] Font Selection Issue

Jake Colman colman at ppllc.com
Sun Oct 10 19:58:35 CEST 2010


Constantin,

Where does qtconfig store its settings?  I checked and cannot figure it
out.

...Jake


>>>>> "CM" == Constantin Makshin <cmakshin at gmail.com> writes:

   CM> Look in the "qtconfig" ("qtconfig-qt4", "qt4-qtconfig", etc., I
   CM> don't know how it's named in Solaris) utility.

   CM> If it's not available, you may try to compile it yourself —
   CM> it's in the "tools/qtconfig" subdirectory of the Qt source code
   CM> tarball.

   CM> Another possible cause of the problem is that Qt or fontconfig
   CM> can't find the font you requested and takes default font instead.

   CM> On Friday 08 October 2010 17:15:26 Jake Colman wrote:
   >> 
   >> I've been reading on how to check my fontconfig configuration.  But
   >> where is the Qt configuration for font substitution?  Are you referring
   >> to something more than the QFont class?
   >> 
   >> >>>>> "CM" == Constantin Makshin <cmakshin at gmail.com> writes:
   >> 
   CM> Check your fontconfig and Qt configurations for font
   CM> substitutions.
   >> 
   CM> On Thursday 07 October 2010 17:58:40 Jake Colman wrote:
   >> >> 
   >> >> Using Qt4 on Solaris 10 I'm having trouble selecting the correct font
   >> >> when using Qt built with support for fontconfig.
   >> >> 
   >> >> In order to ensure that I am being very specific in my request (for
   >> >> the
   >> >> purpose of this test), I created a font and then used QFontInfo to
   >> >> see
   >> >> what I got.
   >> >> 
   >> >> The font is created as follows:
   >> >> 
   >> >> QFont Font;
   >> >> Font.setRawName("-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1");
   >> >> 
   >> >> When built without fontconfig support, QFontInfo gives me the
   >> >> following
   >> >> (which is what I'd expect):
   >> >> 
   >> >> Font Info: 
   >> >> Family: Helvetica [Adobe]
   >> >> Point Size: 9
   >> >> Pixel Size: 12
   >> >> Exact Match: 1
   >> >> 
   >> >> When built with fontconfig, however, I am getting the following:
   >> >> 
   >> >> Font Info: 
   >> >> Family: Bitstream Vera Sans
   >> >> Point Size: 9
   >> >> Pixel Size: 12
   >> >> Exact Match: 0
   >> >> 
   >> >> Why is Qt with fontconfig not giving me the correct font?
   >> >> 
   >> >> ...Jake
   CM> _______________________________________________
   CM> Qt-interest mailing list
   CM> Qt-interest at trolltech.com
   CM> http://lists.trolltech.com/mailman/listinfo/qt-interest

-- 
Jake Colman | Director, Software Development
Principia Partners LLC
101 West Elm Street | Conshohocken | PA 19428 | +1 (610) 755 9770
t: +1 (610) 755 9786 | c: +1 (610) 348 2788 | f: +1 (201) 221 8929
e: colman at ppllc.com | w: www.principiapartners.com
Credit technology innovation awards winner 2008 and 2009




More information about the Qt-interest-old mailing list