summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontdatabase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qfontdatabase.cpp')
-rw-r--r--src/gui/text/qfontdatabase.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index 1e94bf5..94f21b8 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -81,12 +81,14 @@
# define FM_DEBUG if (false) qDebug
#endif
+#if defined(Q_WS_WIN) && !defined(QT_NO_DIRECTWRITE)
+# include <dwrite.h>
+#endif
+
QT_BEGIN_NAMESPACE
#define SMOOTH_SCALABLE 0xffff
-Q_GUI_EXPORT extern int qt_defaultDpiY(); // in qfont.cpp
-
bool qt_enable_test_font = false;
Q_AUTOTEST_EXPORT void qt_setQtEnableTestFont(bool value)
@@ -643,13 +645,24 @@ public:
#if defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE)
, symbianExtras(0)
#endif
+#if defined(Q_WS_WIN) && !defined(QT_NO_DIRECTWRITE)
+ , directWriteFactory(0)
+ , directWriteGdiInterop(0)
+#endif
{ }
+
~QFontDatabasePrivate() {
free();
#if defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE)
if (symbianExtras)
delete symbianExtras;
#endif
+#if defined(Q_WS_WIN) && !defined(QT_NO_DIRECTWRITE)
+ if (directWriteGdiInterop)
+ directWriteGdiInterop->Release();
+ if (directWriteFactory != 0)
+ directWriteFactory->Release();
+#endif
}
QtFontFamily *family(const QString &f, bool = false);
void free() {
@@ -667,6 +680,12 @@ public:
#endif
QtFontFamily **families;
+#if defined(Q_WS_WIN) && !defined(QT_NO_DIRECTWRITE)
+ IDWriteFactory *directWriteFactory;
+ IDWriteGdiInterop *directWriteGdiInterop;
+#endif
+
+
struct ApplicationFont {
QString fileName;
QByteArray data;