diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index 8090812..161fe16 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -60,7 +60,7 @@
 #  define FD_DEBUG if (false) qDebug
 #endif
 
-// #define FONT_MATCH_DEBUG
+#define FONT_MATCH_DEBUG
 #ifdef FONT_MATCH_DEBUG
 #  define FM_DEBUG qDebug
 #else
@@ -847,6 +847,36 @@ static inline void load(const QString & = QString(), int = -1)
         initializeDb();
 }
 
+QDebug operator<<(QDebug x, const QFontDef &d)
+{
+    QDebugStateSaver saver(x);
+    x.space();
+    x << "QFontDef(" << d.family << d.styleName << d.fallBackFamilies << "pointSize=" << d.pointSize
+             << "pixelSize=" << d.pixelSize << "styleStrategy=" << d.styleStrategy
+             << "styleHint=" << d.styleHint << "weight=" << d.weight
+             << "fixedPitch=" << d.fixedPitch << "style=" << d.style
+             << "stretch=" << d.stretch << "hintingPreference=" << d.hintingPreference
+             << "ignorePitch=" << d.ignorePitch << "fixedPitchComputed=" << d.fixedPitchComputed
+             << ')';
+    return x;
+}
+
+QDebug operator<<(QDebug  d, const QFontCache::Key &k)
+{
+    QDebugStateSaver saver(d);
+    d.space();
+    d << "QFontCache::Key(" << k.def << "script=" << k.script
+             << "multi=" << k.multi << "screen=" << k.screen << ')';
+    return d;
+}
+
+QDebug operator<<(QDebug  d, const QFontCache &c)
+{
+    d << "QFontCache(engineDataCache=" << c.engineDataCache.keys() << ",\n"
+      << "engineCache=" << c.engineCache.keys() << ')';
+    return d;
+}
+
 static
 QFontEngine *loadSingleEngine(int script,
                               const QFontDef &request,
@@ -868,6 +898,9 @@ QFontEngine *loadSingleEngine(int script,
 
     QFontCache::Key key(def,script);
     QFontEngine *engine = QFontCache::instance()->findEngine(key);
+    qDebug() << __FUNCTION__ << def.family << "script=" << script
+             << "key=" << key << "\nfound=" << engine <<
+                "\nCache=" << *QFontCache::instance();
     if (!engine) {
         if (script != QChar::Script_Common) {
             // fast path: check if engine was loaded for another script
@@ -905,13 +938,16 @@ QFontEngine *loadSingleEngine(int script,
                 return 0;
             }
 
+            qDebug() << "inserting new engine";
             QFontCache::instance()->insertEngine(key, engine);
 
             if (!engine->symbol && script != QChar::Script_Common && (family->writingSystems[QFontDatabase::Latin] & QtFontFamily::Supported) != 0) {
                 // cache engine for Common script as well
                 key.script = QChar::Script_Common;
-                if (!QFontCache::instance()->findEngine(key))
+                if (!QFontCache::instance()->findEngine(key)) {
+                    qDebug() << "inserting new engine 2";
                     QFontCache::instance()->insertEngine(key, engine);
+                }
             }
         }
     }
@@ -923,11 +959,13 @@ QFontEngine *loadEngine(int script, const QFontDef &request,
                         QtFontFamily *family, QtFontFoundry *foundry,
                         QtFontStyle *style, QtFontSize *size)
 {
+    qDebug() << __FUNCTION__ << "script=" << script << request;
     QFontEngine *engine = loadSingleEngine(script, request, family, foundry, style, size);
     Q_ASSERT(!engine || engine->type() != QFontEngine::Multi);
     if (engine && !(request.styleStrategy & QFont::NoFontMerging) && !engine->symbol) {
         QPlatformFontDatabase *pfdb = QGuiApplicationPrivate::platformIntegration()->fontDatabase();
         QFontEngineMulti *pfMultiEngine = pfdb->fontEngineMulti(engine, QChar::Script(script));
+        qDebug() << __FUNCTION__ << "pfMultiEngine=" << pfMultiEngine;
         if (!request.fallBackFamilies.isEmpty()) {
             QStringList fallbacks = request.fallBackFamilies;
 
@@ -945,6 +983,7 @@ QFontEngine *loadEngine(int script, const QFontDef &request,
         // font engine when we are actually looking for a Multi one
         QFontCache::Key key(request, script, 1);
         QFontCache::instance()->insertEngine(key, engine);
+        qDebug() << __FUNCTION__ << "insert pfMultiEngine=" << engine;
     }
 
     return engine;
@@ -2564,6 +2603,7 @@ bool QFontDatabase::supportsThreadedFontRendering()
 */
 QFontEngine *QFontDatabase::findFont(const QFontDef &request, int script)
 {
+    qDebug() << __FUNCTION__ << '>' << request.family << "point=" << request.pointSize << "script=" << script;
     QMutexLocker locker(fontDatabaseMutex());
 
     if (!privateDb()->count)
@@ -2588,6 +2628,7 @@ QFontEngine *QFontDatabase::findFont(const QFontDef &request, int script)
     engine = QFontCache::instance()->findEngine(key);
     if (engine) {
         FM_DEBUG("Cache hit level 1");
+        qDebug() << __FUNCTION__ << '<' << "Cache hit level 1";
         return engine;
     }
 
@@ -2625,6 +2666,7 @@ QFontEngine *QFontDatabase::findFont(const QFontDef &request, int script)
             for (int i = 0; !engine && i < fallbacks.size(); i++) {
                 QFontDef def = request;
                 def.family = fallbacks.at(i);
+                qDebug() << "FB loop" << def.family;
                 QFontCache::Key key(def, script, multi ? 1 : 0);
                 engine = QFontCache::instance()->findEngine(key);
                 if (!engine) {
@@ -2651,7 +2693,7 @@ QFontEngine *QFontDatabase::findFont(const QFontDef &request, int script)
 
         FM_DEBUG("returning box engine");
     }
-
+    qDebug() << __FUNCTION__ << '<' << request.family << "point=" << request.pointSize << "script=" << script;
     return engine;
 }
 
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
index c8eaccd..c9d9027 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
@@ -1083,6 +1083,7 @@ QWindowsFontDatabase::~QWindowsFontDatabase()
 
 QFontEngineMulti *QWindowsFontDatabase::fontEngineMulti(QFontEngine *fontEngine, QChar::Script script)
 {
+    qDebug() << __FUNCTION__ <<  fontEngine << "script=" << script;
     return new QWindowsMultiFontEngine(fontEngine, script);
 }
 
@@ -1091,7 +1092,7 @@ QFontEngine * QWindowsFontDatabase::fontEngine(const QFontDef &fontDef, void *ha
     QFontEngine *fe = QWindowsFontDatabase::createEngine(fontDef,
                                                          QWindowsContext::instance()->defaultDPI(),
                                                          sharedFontData());
-    qCDebug(lcQpaFonts) << __FUNCTION__ << "FONTDEF" << fontDef << fe << handle;
+    qDebug() << __FUNCTION__ << "FONTDEF" << fontDef << fe << handle;
     return fe;
 }
 
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp
index 3685197..e329029 100644
--- a/src/plugins/platforms/windows/qwindowsfontengine.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp
@@ -262,6 +262,7 @@ int QWindowsFontEngine::getGlyphIndexes(const QChar *str, int numChars, QGlyphLa
     Will probably be superseded by a common Free Type font engine in Qt 5.X.
 */
 
+int feCount = 0;
 QWindowsFontEngine::QWindowsFontEngine(const QString &name,
                                        LOGFONT lf,
                                const QSharedPointer<QWindowsFontEngineData> &fontEngineData)
@@ -285,7 +286,7 @@ QWindowsFontEngine::QWindowsFontEngine(const QString &name,
     designAdvances(0),
     designAdvancesSize(0)
 {
-    qCDebug(lcQpaFonts) << __FUNCTION__ << name << lf.lfHeight;
+    qDebug() << __FUNCTION__ << '#' << feCount++ << name << lf.lfHeight;
     hfont = CreateFontIndirect(&m_logfont);
     if (!hfont) {
         qErrnoWarning("%s: CreateFontIndirect failed for family '%s'", __FUNCTION__, qPrintable(name));
@@ -321,6 +322,7 @@ QWindowsFontEngine::QWindowsFontEngine(const QString &name,
 
 QWindowsFontEngine::~QWindowsFontEngine()
 {
+    qDebug() <<  '#' << feCount-- << __FUNCTION__ ;
     if (designAdvances)
         free(designAdvances);
 
@@ -1307,8 +1309,13 @@ void QWindowsFontEngine::initFontInfo(const QFontDef &request,
 QWindowsMultiFontEngine::QWindowsMultiFontEngine(QFontEngine *fe, int script)
     : QFontEngineMulti(fe, script)
 {
+    qDebug() << __FUNCTION__ << "script=" << script;
 }
 
+QWindowsMultiFontEngine::~QWindowsMultiFontEngine()
+{
+    qDebug() << __FUNCTION__ ;
+}
 QFontEngine *QWindowsMultiFontEngine::loadEngine(int at)
 {
     QFontEngine *fontEngine = engine(0);
@@ -1352,6 +1359,7 @@ QFontEngine *QWindowsMultiFontEngine::loadEngine(int at)
             Q_ASSERT(directWriteFont);
             IDWriteFontFace *directWriteFontFace = NULL;
             HRESULT hr = directWriteFont->CreateFontFace(&directWriteFontFace);
+            qDebug() << __FUNCTION__ << "returning QWindowsFontEngineDirectWrite";
             if (SUCCEEDED(hr)) {
                 Q_ASSERT(directWriteFontFace);
                 QWindowsFontEngineDirectWrite *fedw = new QWindowsFontEngineDirectWrite(directWriteFontFace,
@@ -1367,7 +1375,7 @@ QFontEngine *QWindowsMultiFontEngine::loadEngine(int at)
 
     // Get here if original font is not DirectWrite or DirectWrite creation failed for some
     // reason
-
+    qDebug() << __FUNCTION__ << "returning QWindowsFontEngine";
     return new QWindowsFontEngine(fam, lf, data);
 }
 
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.h b/src/plugins/platforms/windows/qwindowsfontengine.h
index 409b442..8444336 100644
--- a/src/plugins/platforms/windows/qwindowsfontengine.h
+++ b/src/plugins/platforms/windows/qwindowsfontengine.h
@@ -167,6 +167,7 @@ class QWindowsMultiFontEngine : public QFontEngineMulti
 {
 public:
     explicit QWindowsMultiFontEngine(QFontEngine *fe, int script);
+    ~QWindowsMultiFontEngine();
 
     QFontEngine *loadEngine(int at) Q_DECL_OVERRIDE;
 };
diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
index 75449e2..86336f3 100644
--- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
@@ -209,7 +209,7 @@ QWindowsFontEngineDirectWrite::QWindowsFontEngineDirectWrite(IDWriteFontFace *di
     , m_xHeight(-1)
     , m_lineGap(-1)
 {
-    qCDebug(lcQpaFonts) << __FUNCTION__ << pixelSize;
+    qDebug() << __FUNCTION__ << pixelSize;
 
     Q_ASSERT(m_directWriteFontFace);
 
@@ -223,7 +223,7 @@ QWindowsFontEngineDirectWrite::QWindowsFontEngineDirectWrite(IDWriteFontFace *di
 
 QWindowsFontEngineDirectWrite::~QWindowsFontEngineDirectWrite()
 {
-    qCDebug(lcQpaFonts) << __FUNCTION__;
+    qDebug() << __FUNCTION__;
 
     m_fontEngineData->directWriteFactory->Release();
     m_directWriteFontFace->Release();
