diff options
Diffstat (limited to 'src/gui/text/qfontdatabase_x11.cpp')
-rw-r--r-- | src/gui/text/qfontdatabase_x11.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/text/qfontdatabase_x11.cpp b/src/gui/text/qfontdatabase_x11.cpp index b1ab478..3b2e4e9 100644 --- a/src/gui/text/qfontdatabase_x11.cpp +++ b/src/gui/text/qfontdatabase_x11.cpp @@ -1939,8 +1939,13 @@ void QFontDatabase::load(const QFontPrivate *d, int script) fe = loadFc(d, script, req); if (fe != 0 && fe->fontDef.pixelSize != req.pixelSize) { - delete fe; - fe = loadXlfd(d->screen, script, req); + QFontEngine *xlfdFontEngine = loadXlfd(d->screen, script, req); + if (xlfdFontEngine->fontDef.family == fe->fontDef.family) { + delete fe; + fe = xlfdFontEngine; + } else { + delete xlfdFontEngine; + } } |