[Interest] QFontEngineFT glyph problem
Grey DeMonstr
greydemonster at gmail.com
Wed Dec 21 15:41:19 CET 2016
Hello. My application has the following issue: it reads the external font
files tens thousands times a minute. I'm using Qt 5.6.1, so I've checked
bugtracker and backported the https://bugreports.qt.io/browse/QTBUG-49452 fix
from Qt 5.6.2 branch. That helped a lot, but really not fully. Now font
files are read about a one thousand times per minute.
Looks like glyphs are going to cache but still re-read every time.
QFontEngineFT::Glyph *QFontEngineFT::loadGlyphFor(...)
{
...
Glyph *glyph = glyphSet != 0 ? glyphSet->getGlyph(g, subPixelPosition)
: 0;
if (!glyph || glyph->format != format || (!fetchBoundingBox &&
!glyph->data)) {
...
glyph = loadGlyph(glyphSet, g, subPixelPosition, format, false);
...
}
return glyph;
}
Reason is: glyph->data is null at all times, so QTBUG-49452 fix checks it
and returns NULLPTR, but on the next pass we are loading this glyph again
and again.
What check or QFontCache improvement will be the best in this case?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20161221/c6afd66f/attachment.html>
More information about the Interest
mailing list