summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine_ft_p.h
diff options
context:
space:
mode:
authorOlli Werwolff <qt-info@nokia.com>2011-10-07 10:00:04 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-10 13:17:44 +0200
commitde6445272d4795c775cafa76c041b08e3d27c01d (patch)
treea875183544c49a799656265fa3cdae472b6228a9 /src/gui/text/qfontengine_ft_p.h
parentc280fa59cb0065addfb441bd05e5f6fae584a316 (diff)
Use freetype font engine on Windows
As windows' fontdatabases also uses functionalities from qbasicunixfontdatabase it was renamed to qbasicfontdatabase. But instead of iterating over the font directories' files it uses system calls to obtain the list of fonts and uses registry values to find the according filenames to add. The native font engine was still kept. It can be activated by adding fontengine=native as platformargument. Change-Id: I7197bed5d18b8a33d4aa97ce91bfa1cd281b80ea Reviewed-on: http://codereview.qt-project.org/5839 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> Sanity-Review: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src/gui/text/qfontengine_ft_p.h')
-rw-r--r--src/gui/text/qfontengine_ft_p.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_ft_p.h b/src/gui/text/qfontengine_ft_p.h
index a236b79f68..f22a043548 100644
--- a/src/gui/text/qfontengine_ft_p.h
+++ b/src/gui/text/qfontengine_ft_p.h
@@ -62,7 +62,9 @@
#include <private/qt_x11_p.h>
#endif
+#ifndef Q_OS_WIN
#include <unistd.h>
+#endif
#ifndef QT_NO_FONTCONFIG
#include <fontconfig/fontconfig.h>
@@ -123,7 +125,7 @@ struct QFreetypeFace
private:
friend class QFontEngineFT;
- friend class QScopedPointerDeleter<QFreetypeFace>;
+ friend struct QScopedPointerDeleter<QFreetypeFace>;
QFreetypeFace() : _lock(QMutex::Recursive) {}
~QFreetypeFace() {}
QAtomicInt ref;
@@ -131,7 +133,13 @@ private:
QByteArray fontData;
};
+// If this is exported this breaks compilation of the windows
+// plugin as qfontengine_ft_p.h/.cpp are also compiled there
+#ifndef Q_OS_WIN
class Q_GUI_EXPORT QFontEngineFT : public QFontEngine
+#else
+class QFontEngineFT : public QFontEngine
+#endif
{
public: