Don't lose the fontDef when setting the size of a raw font.

QFontEngineFT::cloneWithSize, which is used among other things by
QRawFont::setPixelSize, should create a new font engine using the font
definition from the current font engine.

Change-Id: I9415422bbecc2bf7b7acf105c12c1c83a894526c
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
This commit is contained in:
Pierre Rossi 2012-01-24 20:22:14 +01:00 committed by Qt by Nokia
parent 7b0dcb48a6
commit e52ef6788b

View File

@ -2058,7 +2058,7 @@ bool QFontEngineFT::initFromFontEngine(const QFontEngineFT *fe)
QFontEngine *QFontEngineFT::cloneWithSize(qreal pixelSize) const
{
QFontDef fontDef;
QFontDef fontDef(this->fontDef);
fontDef.pixelSize = pixelSize;
QFontEngineFT *fe = new QFontEngineFT(fontDef);
if (!fe->initFromFontEngine(this)) {