-QHash<QString, QSGDistanceFieldGlyphCache *> QSGDistanceFieldGlyphCache::m_caches;
-QHash<QString, QGLContextGroupResource<QSGDistanceFieldGlyphCache::DistanceFieldTextureData> > QSGDistanceFieldGlyphCache::m_textures_data;
-
-static QString fontKey(const QRawFont &font)
-{
- QString key;
-
- key = font.familyName();
- key.remove(QLatin1String(" "));
- QString italic = font.style() == QFont::StyleItalic ? QLatin1String("i") : QLatin1String("");
- QString bold = font.weight() > QFont::Normal ? QLatin1String("b") : QLatin1String("");
- key += bold + italic + QString::number(qreal(font.pixelSize()));
-
- return key;
-}
+QHash<QPair<const QGLContext *, QFontEngine *>, QSGDistanceFieldGlyphCache *> QSGDistanceFieldGlyphCache::m_caches;
+QHash<QFontEngine *, QGLContextGroupResource<QSGDistanceFieldGlyphCache::DistanceFieldTextureData> > QSGDistanceFieldGlyphCache::m_textures_data;