From 8582d3b1ad7d879dcb55124933d0d93edb47b66b Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Tue, 22 Mar 2011 17:06:14 +0100 Subject: unlockFace was put in the wrong place in previous patch Should only unlock once after the loop. Reviewed-by: TrustMe --- src/gui/text/qfontengine_ft.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index a4211a9..e90a12f 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -1694,13 +1694,13 @@ void QFontEngineFT::recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFlag g = loadGlyph(glyphs->glyphs[i], 0, Format_None, true); glyphs->advances_x[i] = design ? QFixed::fromFixed(face->glyph->linearHoriAdvance >> 10) : QFixed::fromFixed(face->glyph->metrics.horiAdvance).round(); - if (face) - unlockFace(); } if (fontDef.styleStrategy & QFont::ForceIntegerMetrics) glyphs->advances_x[i] = glyphs->advances_x[i].round(); glyphs->advances_y[i] = 0; } + if (face) + unlockFace(); } glyph_metrics_t QFontEngineFT::boundingBox(const QGlyphLayout &glyphs) -- cgit v0.12