summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/fontdatabases/basic
Commit message (Collapse)AuthorAgeFilesLines
* Android: Fix font mergingEskil Abrahamsen Blomfeldt2014-03-252-2/+6
| | | | | | | | | | | | | Our fallback fonts would contain a minimal list of hardcoded fallback fonts, which is neither sufficient for displaying all text, nor portable to different vendors which can supply different font sets. [ChangeLog][Android] Fixed font merging problem which caused e.g. missing glyphs for Arabic numerals. Task-number: QTBUG-37738 Change-Id: Ic971343a1cd5610c79a81f6f6152c637937b5626 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Apply fontconfig settings to custom fontsAllan Sandfeld Jensen2014-03-221-0/+1
| | | | | | | | | | | Currently QtWebKits custom fonts does not follow the system settings on Linux. This is because they are only handled by the basic fontdatabase. This patch adds handling of custom fonts to QFontconfigDatabase. Change-Id: I676fc97840766b58cd937bb8e2c9f166f30c8a6e Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Decrease code duplicationKonstantin Ritt2014-02-062-14/+5
| | | | | | | | 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>
* Add support for OpenType (.otf) fontsJames Turner2014-01-061-1/+2
| | | | | | | | | | | | | FreeType already has support for the file format, so simply ensure they are picked up by the generic database. (Other backends, such as Windows, already had support) [ChangeLog][QtGui] Qt's generic font database now adds OpenType fonts (.otf). Change-Id: Ief5a3329e66b8066aad284172afd004f2cdfaebb Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Warn if OpenType support missing for script of interestKonstantin Ritt2013-09-131-0/+1
| | | | | | Change-Id: I076cfc5244ca3c060fd005cc3fbf30b357604bc7 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Decrease code duplication in QFontDatabase-sKonstantin Ritt2013-09-131-11/+3
| | | | | | | | Move scriptRequiresOpenType() body right into QFontEngine::supportsScript(), thus centralizing use of this performance cheat. Change-Id: I5f494b086f8f900b631c491f41e9cb800002c0f6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* remove redundant QT statementsOswald Buddenhagen2013-05-201-1/+0
| | | | | | | the top-level file already adds core-private and gui-private Change-Id: Ic3e3a9c5683cc43f5e7a1075efbd7ce7c2f41e1a Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* QFreetypeFace: Fix getFace() uses UTF-8 paths on non UTF-8 localesKonstantin Ritt2013-04-111-1/+1
| | | | | | | | | | QFontEngine::FaceId::filename is intended to be local8Bit-encoded but QFreetypeFace::getFace() always treats it like UTF-8-encoded. Also replace explicit (to|from)Local8Bit and toLatin FaceId::filename conversions with QFile::(en|de)codeName, where appropriate. Change-Id: Ic7beabf0a160f2f02f1667bcb8e6067adaba1c16 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Get rid of qt_determine_writing_systems_from_truetype_bits()Konstantin Ritt2013-03-122-126/+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>
* Fix selection of fonts that require OpenType featuresKonstantin Ritt2013-03-041-2/+1
| | | | | | | | HB_Face's supported_scripts[] expects HB_Script, so QChar::Script should be remapped via script_to_hbscript(). Change-Id: Ib068c35ab76567fe9a61da7d8ab01133a6f58bc0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-222-2/+2
|\ | | | | | | | | | | | | | | | | | | 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-182-2/+2
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge branch 'stable' into devFrederik Gladhorn2013-01-041-1/+1
|\| | | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | 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-212-6/+6
|/ | | | | | | | | | | | | | ...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>
* exclude 3rdparty from lupdateOswald Buddenhagen2012-11-201-0/+2
| | | | | | Change-Id: I00c569787943a87dda60786b179af1f55a94ea68 Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-222-48/+48
| | | | | | | | 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-202-0/+121
| | | | | | | | | | 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>
* Expose QPA API under qpa/*Girish Ramakrishnan2012-05-072-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [platformsupport]Thiago Macieira2012-05-041-2/+2
| | | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: Ie1a4e5ceca21c31e7357f28b90abc9129b122104 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Use QFile::encodeName to encode a file name on UnixThiago Macieira2012-05-041-1/+1
| | | | | | | This usually matches QString::toLocal8Bit, not toAscii. Change-Id: I7b1c3e500be8265de0710cf36ca407c8b3f31edd Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix the build of qt-freetype with -system-zlibThiago Macieira2012-03-221-0/+1
| | | | | | | | | | | | | The static library needs to link to zlib too, so that the plugins using this library link to zlib. At runtime this doesn't make a difference because -system-zlib means QtCore is linked to zlib and the system zlib shared library was loaded, so the symbols are resolved. However, since -Wl,-no-undefined was added to the build, the plugin must link to zlib explicitly too. Change-Id: I10d6df8814e823079fee76ae6a7d5b55057c9daf Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix LSB buildHarald Fernengel2012-03-141-2/+3
| | | | | | | | Fix compliation in LSB by removing legacy calls and adding an explicit header. Change-Id: I13a73211c07457195b5d5aad0854643da1e25f9b Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix support for scripts that require OpenTypeEskil Abrahamsen Blomfeldt2012-03-071-1/+1
| | | | | | | | | We need to load OpenType tables when initializing fonts for scripts that require them. This fixes support for many Brahmic scripts. Change-Id: Ib5e50f2c7e5edb4b3e3ecf9fd004f2cf62634add Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Windows: Fix compilation with -qtnamespaceKai Koehne2012-01-312-1/+10
| | | | | Change-Id: Ib006d74299d65e5872a5a524eaa937e127306ec7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove Symbian specific code in platformsupport.Xizhi Zhu2012-01-301-1/+1
| | | | | Change-Id: I5f06f80ae47b2c9fcd93832c23a453a9193e6120 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-302-2/+2
| | | | | | | | | | 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-232-2/+2
| | | | | | | 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-052-2/+2
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Do not add QPF fonts to basic font dbJiang Jiang2011-11-151-1/+0
| | | | | | | | | | QPlatformFontDatabase::populateFontDatabase() routine uses a different usrPtr format which is not compatible with the one basic font db uses (FontFile *). We shouldn't mix them together. Task-number: QTBUG-22713 Change-Id: I239ea085e14261f6b9ba66b03710a590a44378f9 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Revert "Avoid fontconfig access in fontEngine creation"Jiang Jiang2011-11-041-1/+0
| | | | | | | | | | | This reverts commit 8dcb52df8e2e949232ccded9fad5a4f25ba6dda2. Turns out that hint style is retrieved from font match instead of pattern match, which shouldn't be retreived until font engine creation. Change-Id: I90e779a3823e6a6604cdadb52586fcd5e22c295b Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Use freetype font engine on WindowsOlli Werwolff2011-10-103-0/+582
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>