From fd826c112e01226f40bbfad7e20bdb5461b7ace6 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Sat, 7 Mar 2015 07:59:50 +0400 Subject: [QFontEngineFT] Fix alphamap creation for a cached glyph with no data In case the loadGlyph() was called for a glyph to fetch metrics only, loadGlyphFor() never fetches the data for that glyph but returns a non-null result. Change-Id: I2b258c4b7880059d41dc02f1e5a43903706d3888 Reviewed-by: Lars Knoll --- src/gui/text/qfontengine_ft.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 630161ee28..8ae178c6ad 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -1844,7 +1844,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyphFor(glyph_t g, return 0; Glyph *glyph = glyphSet != 0 ? glyphSet->getGlyph(g, subPixelPosition) : 0; - if (!glyph || glyph->format != format) { + if (!glyph || glyph->format != format || (!fetchBoundingBox && !glyph->data)) { lockFace(); FT_Matrix m = this->matrix; FT_Matrix ftMatrix = glyphSet != 0 ? glyphSet->transformationMatrix : QTransformToFTMatrix(t); -- cgit v1.2.3