#include <wtf/text/StringHash.h>
#include <QFont>
+#include <QFontDatabase>
#if HAVE(QRAWFONT)
#include <QTextLayout>
#endif
FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomicString& familyName)
{
+#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)
+ QFontDatabase db;
+ if (!db.hasFamily(familyName))
+ return 0;
+#endif
return new FontPlatformData(fontDescription, familyName);
}