summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsfontdatabase.h
Commit message (Collapse)AuthorAgeFilesLines
* Windows QPA: Remove qtwindows_additional.h.Friedemann Kleint2016-05-171-1/+1
| | | | | | | | | | Clean up helper definitions required for old SDKs and MinGW and move the remaining ones to the files that require them. Ensure compilations with MinGW 4.9. Task-number: QTBUG-51673 Change-Id: I607989dd1d9197f237c6d021209a2c94aeb84021 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Windows QPA: Fix debug operators.Friedemann Kleint2015-10-271-0/+4
| | | | | | | | | | Enclose all debug operators within QT_NO_DEBUG_STREAM, declare all public ones and make the others static. Add operators for POINT and WINDOWPLACEMENT. Task-number: QTBUG-48449 Change-Id: I33f2dba2bf486a8f5cb11f11f4e2b37cce086def Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Windows: register alias for application fontJian Liang2015-07-201-0/+1
| | | | | | | | | | | | | | | | | | | Previously Qt didn't register an English name alias for application font files under Windows. Suppose we add an application font file using QFontDatabase::addApplicationFont(), the font family name returned by QFontDatabase::applicationFontFamilies() then was the English name of the font file, but the corresponding font family name returned by QFontDatabase::families() was the localized version. This prevented us from using the English font family to access the font since it was not registered as alias. Add an overload of populateFamily() which will register the English name of the application font file as alias. Task-number: QTBUG-47096 Change-Id: Idb89b7d8a419646c209426e826e7fd1ebee49662 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-101-2/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro src/gui/image/qimage_conversions.cpp src/gui/opengl/qopenglextensions_p.h src/gui/text/qtextengine.cpp src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/eglfs/qeglfshooks_stub.cpp src/plugins/platforms/eglfs/qeglfsscreen.cpp src/plugins/platforms/eglfs/qeglfswindow.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp src/plugins/platforms/windows/qwindowsnativeinterface.cpp src/plugins/platforms/windows/qwindowsscreen.cpp src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/windows/qwindowswindow.h src/plugins/platforms/xcb/qxcbdrag.h src/widgets/itemviews/qabstractitemview.cpp src/widgets/kernel/qwidget.cpp src/widgets/util/qsystemtrayicon_p.h tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp Thanks to Friedemann Kleint for resolving the qwindowsfontdatabase.cpp conflicts. Change-Id: I937232c30523d5121c195d947d92aec6f129b03e
| * Windows: Rewrite font database to use delayed population.Friedemann Kleint2015-02-031-2/+1
| | | | | | | | | | | | | | | | Task-number: QTBUG-43774 Change-Id: I3b0b0ead0953b3b88a6d0092c694a2a00f70acf7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | [QWindowsFontDatabase] Drop some dead codeKonstantin Ritt2015-02-021-1/+1
| | | | | | | | | | | | Change-Id: I95b6c95bf0be875b3fcb66150a13bd3b5df9830a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | [QWindowsFontDatabase] Drop some dead codeKonstantin Ritt2015-02-021-1/+1
|/ | | | | | Change-Id: I56b867508a9d597462c2e71c71c3aea0b8ea9aca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Oswald Buddenhagen2014-10-281-2/+2
|\ | | | | | | Change-Id: I224e44a9df314b9a99d33148b6cf400fcbc9de8e
| * fix namespaced DirectWrite buildJoerg Bornemann2014-10-281-2/+2
| | | | | | | | | | Change-Id: Iec6d6ca121b2b04fc1eb4a97f1387ee630e6e1f5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* | Windows/Direct2D platform plugins: Add Q_DECL_OVERRIDE.Friedemann Kleint2014-07-291-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | Replace old virtual declarations by Q_DECL_OVERRIDE where applicable. Errors discovered: QWindowsScreen::primaryOrientation() did not overwrite any method, changed to orientation(). Task-number: QTBUG-38858 Task-number: QTBUG-38993 Change-Id: Ie85d5235f3cd35c7a24cac3c1c7693c6508b1009 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | Windows: Use common code paths for default font families.Friedemann Kleint2014-07-261-0/+1
|/ | | | | | | | | | Factor out function to determine the font family for a style hint and use that for the FreeType font database as well. Task-number: QTBUG-39961 Change-Id: Ic5ec0928c7994b61e4d2b10d829826658b1aa1d5 Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Guarantee QPFDB::fontEngine() always return non-multi font engineKonstantin Ritt2014-03-111-2/+2
| | | | | | | | | | After QPA refactoring, QWindowsFontDatabase::fontEngine() was returning a multi font engine w/o any particular reason. This makes the code more obvious and opens the road to further improvements. Change-Id: I4858026ddf774d3159c89357b1c905f5112b1c51 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Decrease code duplicationKonstantin Ritt2014-02-061-1/+1
| | | | | | | | Check engine's supported scripts in a single place and remove unused script parameter from fontEngine(). Change-Id: Ic153803bef519320c370b058e77eac1a4d92afd0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QWindowsFontDatabaseFT: Code deduplicationKonstantin Ritt2014-01-301-0/+2
| | | | | | | | Re-use a private helper API from QWindowsFontDatabase. This also helped in consolidating the behavior between these two. Change-Id: I93ba0a486a2c11fdefd328af090497dde5b0fbdb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-281-1/+0
|\ | | | | | | Change-Id: I12b4d8b99bdccae53b1a978cd6eb8f4ac6fb3c76
| * Make QWindowsFontEngineData thread-local.Friedemann Kleint2013-01-251-1/+0
| | | | | | | | | | | | | | Task-number: QTBUG-29266 Change-Id: Id963187f1ef03caf4e9ed3c4397225a9ad7362bb Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-221-1/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Update Qt internals to use QChar::ScriptKonstantin Ritt2012-12-211-2/+2
|/ | | | | | | | | | | | | | ...and remove the outdated QUnicodeTables::Script enum. QFontEngineData now has one extra slot that never used (engines[QChar::Script_Inherited]). engines[QChar::Script_Unknown], if accessed, would be set with a Box engine instance, and could be used as a minor optimization some time later. In order to preserve the existing behavior, we map all scripts up to Latin to Common. Change-Id: Ide4182a0f8447b4bf25713ecc3fe8097b8fed040 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Support fallback fonts in DirectWrite font engineEskil Abrahamsen Blomfeldt2012-07-101-0/+1
| | | | | | | | | | | | | When selecting fallback fonts for a DirectWrite font, we would cast the font engine to QWindowsFontEngine and get unpredictable results and crashes. This change factors out getting the LOGFONT data from the QFontDef struct and will use this to create a new DirectWrite engine. Task-number: QTBUG-22658 Change-Id: I743944d9a44d8742b47b1aa3354532493362cc4a Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Expose QPA API under qpa/*Girish Ramakrishnan2012-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reasons for doing this are: 1. _qpa.h end up in the master QtGui include file. QtGui is meant for userland applications. qpa code is neither binary nor source compatible. Inadvertant use of QPA api makes the user code binary-incompatible. 2. syncqt creates forwarding headers for non-private header files. This gives people the impression that this is public API. As discussed on the mailing list, even though QPA api is internal and subject to change, it needs to treated differently from private headers since they will be used by in-qtbase and out-of-qtbase plugins. This commit does the following: 1. The _qpa in QPA header files is dropped. 2. syncqt now treats any file with qplatform prefix as a special file and moves it to qpa/ directory. The recommended way of using QPA API in plugins is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API from multiple modules (for example, qplatformfoo might be in QtPrintSupport) 3. The user needs to explicitly add QT += <module>-private to get access to the qpa api. 4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo includes. This commit does not change the cpp filenames. This requires a more careful merging of existing non qpa cpp files and existing cpp files on a case by case basis. This can be done at anytime. The following files are not renamed as part of this changed but will be fixed as part of a future change: src/gui/kernel/qgenericpluginfactory_qpa.h src/gui/kernel/qgenericplugin_qpa.h src/gui/kernel/qwindowsysteminterface_qpa.h files were renamed using for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done includes were renamed using script for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \ -e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \ -e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \ -e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \ -e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \ $file done Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Windows: Fix QRawFont loading from data.Miikka Heikkinen2012-04-231-0/+9
| | | | | | | | | | | | | The implementation for loading QRawFont from data was missing from Windows QPA plugin. For freetype font database, just called the parent QBasicFontDatabse implementation. For native font database, ported the implementation from Qt 4.8 qrawfont_win.cpp. Task-number: QTBUG-24197 Change-Id: Ia784d4cbc4f37c925aa49e53d04faf06a7169a73 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Make it possible to enable non-scalable font scalingMiikka Heikkinen2012-04-101-0/+2
| | | | | | | | | | | | | | | | | | | Windows native font engine supports scaling of non-scalalble fonts, so make it possible to do so. Added two functions to QPlatformFontDatabase: fontsAlwaysScalable() and standardSizes(), and made fontsAlwaysScalable() to return true for Windows native font database. Windows Freetype font engine doesn't seem to support scaling of non-scalable fonts, so didn't enable it in there. Added implementation of standardSizes() for Mac OS. Task-number: QTBUG-24970 Change-Id: I41c9356ede8a37b7c61db94340dbeb5b629f34b9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Implement application font loading for WindowsMiikka Heikkinen2012-03-271-0/+8
| | | | | | | | | | | | | | | | | For FreeType Windows font database, use the application font loading implementation of the parent class. For native Windows font database, the implementation was adapted from Qt 4.8. Also fixed a bug in font database population, where old data was not destroyed before population, resulting in fonts not getting properly repopulated when a new font was added. Task-number: QTBUG-24193 Task-number: QTBUG-24195 Task-number: QTBUG-24196 Change-Id: Ie224a87baf7500b9867aaafa807f62dd4503dee8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Introduce FontSmoothingGamma as a platform style hint.Friedemann Kleint2012-03-271-0/+2
| | | | | | | | | | - Allocate gamma tables on the heap in a thread-safe way, use font smoothing returned by the style hints of the platform to calculate them. - Improve font rendering on Windows. Change-Id: I8cd39b51cf03cbd642474c02b9076814baecd597 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* build fix for -no-freetype in Windowsjian liang2012-03-141-1/+2
| | | | | | | | | | Don't use QWindowsFontDatabaseFT::systemDefaultFont() and QWindowsFontDatabaseFT::LOGFONT_to_QFont() in qwindowsfontdatabase.cpp and qwindowstheme.cpp because it is not available when building with -no-freetype. Change-Id: I11075475ff435c55b0c641540f95a4d3861b79da Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Add fonts to QPlatformTheme.Friedemann Kleint2012-03-071-1/+0
| | | | | | | | | | | | | | | | - Remove QPlatformFontDatabase::defaultFonts() returning a hash containing widget name ->font and the Windows implementation. - Add enumeration and font accessor to QPlatformTheme. The value returned for the enumeration value overwrites the default font of the font database. - Implement for Windows, Mac and KDE. - Add more Windows palettes. Task-number: QTBUG-23686 Change-Id: I8a2abdfd216df23daa7c9630c54264cdf61295db Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix email address in license headers.Jason McDonald2011-09-151-1/+1
| | | | | | | Change-Id: I5abf378f91a3a8f453058f36254f04258147cc15 Reviewed-on: http://codereview.qt-project.org/4851 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add Windows to the Lighthouse.Friedemann Kleint2011-08-181-0/+107
Add an initial Lighthouse plugin for the Windows operating system. Change-Id: I6934562266e1aa0ac270bf6107df05a9e56ef82c Reviewed-on: http://codereview.qt.nokia.com/3107 Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>