[Qt-interest] Qt does not provide a way to get a font's "em" size?
Nikos Chantziaras
realnc at arcor.de
Thu Mar 4 15:27:43 CET 2010
AFAIK, the x-height of a font has nothing to do with the em size. A
fall-back for the em size would actually be pixelSize(). But it's only
a fall-back.
On 03/04/2010 04:14 PM, Dan White wrote:
> How about using xHeight ?
>
> <http://doc.trolltech.com/4.6/qfontmetrics.html#xHeight>
>
> “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
> Bill Waterson (Calvin& Hobbes)
>
> ----- Nikos Chantziaras<realnc at arcor.de> wrote:
>> I need to get the "em" size of fonts. This is a design property of
>> scalable fonts. QFontInfo and QFontMetrics don't seem to offer this
>> information and I would have to use FreeType directly to query it
>> (QFont::freetypeFace()). That's not a good solution here since the
>> application needs to stay cross platform and still be able to get the em
>> size.
>>
>> Is there any portable solution within Qt to get to that information?
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list