[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 <lars.knoll@digia.com>
This commit is contained in:
Konstantin Ritt 2015-03-07 07:59:50 +04:00
parent 69504803a9
commit fd826c112e

View File

@ -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);