Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
4.5.3, 4.6.0
-
None
-
Windows XP, MSVC2008
Description
The QFontMetrics is different for a font that has been created with a family name in the constructor and for a font that has this value set by QFont::setFamily() on Windows.
#include <QtGui> int main(int argc, char *argv[]) { QApplication app(argc, argv); QFont f1("Times"); qDebug() << f1.family() << " xHeight: " << QFontMetrics(f1).xHeight(); // "Times" xHeight: 4 QFont f2; f2.setFamily("Times"); qDebug() << f2.family() << " xHeight: " << QFontMetrics(f2).xHeight(); // "Times" xHeight: 3 return 0; }
This probably causes problems when "ex" unit is used in stylesheets.