diff options
author | Olli Werwolff <qt-info@nokia.com> | 2011-10-07 10:00:04 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-10 13:17:44 +0200 |
commit | de6445272d4795c775cafa76c041b08e3d27c01d (patch) | |
tree | a875183544c49a799656265fa3cdae472b6228a9 /src/gui | |
parent | c280fa59cb0065addfb441bd05e5f6fae584a316 (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')
-rw-r--r-- | src/gui/text/qfontengine_ft.cpp | 4 | ||||
-rw-r--r-- | src/gui/text/qfontengine_ft_p.h | 10 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 1ce73023b1..9ed3906f4a 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -644,7 +644,11 @@ QFontEngineFT::QFontEngineFT(const QFontDef &fd) antialias = true; freetype = 0; default_load_flags = FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH; +#ifndef Q_OS_WIN default_hint_style = HintNone; +#else + default_hint_style = HintFull; +#endif subpixelType = Subpixel_None; lcdFilterType = 0; #if defined(FT_LCD_FILTER_H) 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: |