summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of qt_determine_writing_systems_from_truetype_bits()Konstantin Ritt2013-03-121-1/+1
| | | | | | | Move this code to QPlatformFontDatabase and get rid of all dups of it. Change-Id: Idea6c84819039bf3b345b1305305951ade8d1ac4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-141-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/concurrent/doc/qtconcurrent.qdocconf src/corelib/doc/qtcore.qdocconf src/corelib/global/qglobal.h src/dbus/doc/qtdbus.qdocconf src/dbus/qdbusmessage.h src/gui/doc/qtgui.qdocconf src/gui/image/qimagereader.cpp src/network/doc/qtnetwork.qdocconf src/opengl/doc/qtopengl.qdocconf src/opengl/qgl.h src/plugins/platforms/windows/qwindowswindow.cpp src/printsupport/doc/qtprintsupport.qdocconf src/sql/doc/qtsql.qdocconf src/testlib/doc/qttestlib.qdocconf src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf src/widgets/doc/qtwidgets.qdocconf src/xml/doc/qtxml.qdocconf Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
| * Fix minor typos in docs, printed messages & commentsSze Howe Koh2013-01-281-1/+1
| | | | | | | | | | | | | | Missing apostrophes Change-Id: I3ef5e9d494fb7a37f8e6075f24cd3a274e572c23 Reviewed-by: Jerome Pasion <jerome.pasion@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>
* | Merge branch 'stable' into devFrederik Gladhorn2013-01-041-4/+4
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/painting/shared/shared.pri src/corelib/tools/qharfbuzz_p.h src/corelib/tools/qunicodetools.cpp src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp Change-Id: Ibc9860abf570e5ce8b052fb88feb73ec35e64bd3
| * Fix styleName support in QPA font databaseJiang Jiang2012-12-141-4/+4
| | | | | | | | | | | | | | | | | | Font styleName support was disconnected since Qt switched to QPA fontdatabase. Now add the code from Qt 4.8 back to enable this in QPA. Change-Id: Iab2cbfd5468f87542183348c2123ca4b2c270692 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Update Qt internals to use QChar::ScriptKonstantin Ritt2012-12-211-5/+5
|/ | | | | | | | | | | | | | ...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>
* Fix freetype font rendering for Windows CEAndreas Holzammer2012-08-201-0/+47
| | | | | | | | | | Windows CE does not have support for GetGlyphOutline. So addGlyphToPath will not work. QML uses it for their distance field rendering. One option to bypass this issue is to use freetype as rendering backend. Change-Id: I965254344945cbdad771a5d505fb61c1cc2087df Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Windows: Fix warnings about being unable to load fonts from font dir.Friedemann Kleint2012-06-141-1/+0
| | | | | | | | | | | | | Do not call QPlatformFontDatabase::populateFontDatabase(), which tries to load qpf2-fonts from the Qt library directory. This directory is not installed on Windows. Note: This affects non-in-source builds only. Task-number: QTBUG-26066 Change-Id: I5782e61965958fc48e0edd7a3d50eef325529708 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Windows: Fix QRawFont loading from data.Miikka Heikkinen2012-04-231-1/+1
| | | | | | | | | | | | | 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>
* Fix compilation with QT_NO_DEBUG_OUTPUT definedAndy Shaw2012-04-201-0/+2
| | | | | Change-Id: If96e93c08240e0f626f8e465993b2c38b2cad832 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't hardcode the default families in qfont_qpa.cppPierre Rossi2012-04-101-0/+25
| | | | | | | | | Since different platforms come with different fonts, we should probably leave it up to the platform to decide which family to use. Change-Id: I18bb81c0ce87cc7e9ac7f3abaeae1b41c0ce8410 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Windows: Improve Freetype font database registry check for fontsMiikka Heikkinen2012-04-031-0/+2
| | | | | | | | | | | | | Some non-scalable fonts like "Courier" list some numbers after the font name in Windows registry, e.g. "Courier 10,12,15". These are not part of the font name and therefore confused the algorithm looking for font files. Improved the algorithm to ignore this kind of number list. Single numbers are still expected to be part of the font name. Task-number: QTBUG-24970 Change-Id: I3fe45b798f44bee962e5b3aa748fc4717f723353 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Implement application font loading for WindowsMiikka Heikkinen2012-03-271-16/+7
| | | | | | | | | | | | | | | | | 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>
* build fix for -no-freetype in Windowsjian liang2012-03-141-10/+3
| | | | | | | | | | 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-39/+1
| | | | | | | | | | | | | | | | - 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>
* Fix Windows -no-freetype buildJonathan Liu2012-02-241-178/+3
| | | | | | | | | | | | | The localizedName and getEnglishName functions were defined in qwindowsfontdatabase_ft.cpp but used in qwindowsfontdatabase.cpp. However if -no-freetype is specified during configure then qwindowsfontdatabase_ft.cpp is not compiled which results in an undefined reference. To resolve this, the functions are moved to qwindowsfontdatabase.cpp which is always compiled whether -no-freetype is specified or not. Change-Id: I085d84cecb29065ba5e6495b52eef7a678947bdc Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Windows: Fix compilation with -qtnamespaceKai Koehne2012-02-171-0/+4
| | | | | Change-Id: I00ba88887100b699d620875d868f8a769259a768 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Use english name to match font in windows platformjian liang2012-02-161-5/+188
| | | | | | | | | | | | | | In windows platform, simplified chinese envrionment, the default font family name is "SimSun" which is not in the font list generated by EnumFontFamiliesEx(), this will cause chinese font can't be displayed. This patch will generate font's english name during font enumeration in windows platform, and take font's english name into consideration in font matching. The english name generation code is taken from Qt4.8 Change-Id: Ie939ec0c8c08c628a835c7a53fb22d0545626d9c Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Improvement to font database cleanupjian liang2012-02-101-12/+19
| | | | | | | | | | | | | | | | | | This patch do the following things: 1) Call QFontDatabasePrivate::free() to clean up font database before destroying the platform integration object. This is to prevent object leak which is allocated by platform plugin. 2) Allocate FontFile structure for each font registered in windows platform to prevent double free of FontFile structure. 3) qt_registerFont() will release the old handle of the registered font and replace it with the new handle. This is to prevent FontFont structure leak. Change-Id: Ib5ca20c695e1e365689fd8554f7caff6ee77a0b1 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix compilation on MinGW.Friedemann Kleint2012-02-031-18/+10
| | | | | | | | | | | - Add missing constant. - Make FontKey a pair instead of a function-local type which cannot be used as template parameter for gcc. - Fix warnings about redefinition of NOMINMAX and enumeration. Change-Id: Ie3eb6e5b8dd9cd81210d6e10270ada0158aaf809 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Windows QPA: Compile with QT_NO_CAST_FROM_ASCII, warnings.Friedemann Kleint2012-02-021-7/+9
| | | | | Change-Id: I75d6a102a6a1fa0b5f8add049442f23d6fd57725 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* speed up font enumeration in windows platformjian liang2012-02-021-8/+31
| | | | | | | | | | | Currently, font enumeration is very slow in windows platform, it will take several seconds to enumerate all fonts for the first time. This patch cache the font information queried from font registry, it can significantly speed up font enumeration. Change-Id: Ic783877b7f3db3facf24965b0c5d669b22d40c61 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@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>
* Build fix if using '-no-stl' configure optionYuchen Deng2012-01-031-0/+2
| | | | | | | | | | MSVC2010SP1: error C3861: 'wmemcpy': identifier not found Change-Id: Ib28edb5e38d691635c56dac846134e1c88c3f312 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Use freetype font engine on WindowsOlli Werwolff2011-10-101-0/+492
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>