summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/fontdatabases/fontconfig
Commit message (Collapse)AuthorAgeFilesLines
* Update Unicode data up to v7.0Konstantin Ritt2015-03-271-1/+24
| | | | | | | | | | | | | | | | | | | | | | * Two newly adopted currency symbols: the Azerbaijan manat and the Russia ruble * Pictographic symbols (including many emoji), geometric symbols, arrows, and ornaments originating from the Wingdings and Webdings sets * Twenty-three new lesser-used and historic scripts extending support for written languages of North America, China, India, other Asian countries, and Africa * Letters used in Teuthonista and other transcriptional systems, and a new notational set, Duployan For more details, see http://www.unicode.org/versions/Unicode7.0.0/ The Properties struct's .*Diff members were narrowed down to signed 15 bits and the unicodeVersion has been expanded to 8 bits. [ChangeLog][QtCore] Unicode data updated to v.7.0 Change-Id: I93ab6f79fa3b05f61abc7279f1d046834c1c1a0b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Correct typo in the Gujarati openType identififer.Michael Brüning2015-02-251-1/+1
| | | | | | | | Based on testing by Paresh Adhia. Task-number: QTBUG-44568 Change-Id: I0a84710bcda40f65b38c3b18f4d9b34f654e4c22 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Update copyright headersJani Heikkinen2015-02-114-28/+28
| | | | | | | | | | | | | | | | | | 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-38/+38
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Only use Xft font settings as defaults, and let fontconfig overrideAllan Sandfeld Jensen2015-02-021-38/+38
| | | | | | | | | | | | | | | | | | | | | | | | On a GNOME or UNITY desktop, Qt will currently read font-settings from Xft and use those ignoring any fontconfig instructions. This patch changes the behavior so the Xft settings are only used as default, but any explicit overrides by fontconfig will take precedence. Task-number: QTBUG-43660 Change-Id: Ie10d5828cbfdd95fe5364c63a625d455d9213936 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-211-0/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| * Turn off font hinting when we do high DPI scalingPaul Olav Tvete2015-01-161-0/+5
| | | | | | | | | | | | | | | | | | Font hinting depends on the specific pixel size, and ends up very wrong when the painter is scaled. Change-Id: I2007ec7e7ad8d52358d76e88e030ea4df7e91455 Task-number: QTBUG-43809 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | Add QFont::Weight enum valuesPierre Rossi2014-12-121-5/+11
| | | | | | | | | | | | | | | | | | | | And try to make good use of them in order to match the QFont request more closely. Task-number: QTBUG-38482 Change-Id: I768dfa8828e370d77a1c17ecf4796d750b3edd9b Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-032-9/+9
| | | | | | | | | | | | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QFontconfigDatabase weight-matching refactoringPierre Rossi2014-11-271-19/+22
| | | | | | | | | | | | | | | | | | Factor out the piece-wise linear weight matching in an attempt to make it less error-prone to add new weights to the QFont::Weight enum. Change-Id: I5fefdba67a60a061f8b9104393194a27bc8c6e35 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | Merge QFontEngineMultiBasicImpl and QFontEngineMultiKonstantin Ritt2014-11-262-4/+4
|/ | | | | | | Minor refactoring also improves the behavior and the code readability. Change-Id: Id89dd224f4132a4c0dfbc16f414ef42cc8d8a4da Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* fontconfig: do not assume the path to a font file is Latin1-encodedShawn Rutledge2014-10-291-1/+1
| | | | | | | Task-number: QTBUG-42249 Change-Id: Ie5d41ed26a69103991a5189c4f42aa37ac73de26 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Make font hinting and antialiasing size dependent when using FontConfigAlexander Volkov2014-10-171-0/+3
| | | | | | | | | Add the pixel size of the font to the search pattern to get size dependent font settings. This patch allows to take into account KDE settings for font sizes which should be excluded from antialiasing. Change-Id: I8bd8b7b3d585009d0a39db631cd02b7970537f5c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Reduce code duplication in QFontconfigDatabaseAlexander Volkov2014-10-162-146/+97
| | | | | | | Extract common part from fontEngine() methods to setupFontEngine(). Change-Id: Id4aee43b2a477f9fd40dc564d96a2335bfde9e22 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-244-76/+44
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-232-0/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The isAlwaysAskOption was removed in 38621713150b663355ebeb799a5a50d8e39a3c38 so manually removed code in src/plugins/bearer/connman/qconnmanengine.cpp Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qcollator_macx.cpp src/corelib/tools/qstring.cpp src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow_p.h src/gui/text/qtextengine.cpp src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h src/plugins/platforms/android/qandroidinputcontext.cpp src/plugins/platforms/xcb/qglxintegration.cpp src/plugins/platforms/xcb/qglxintegration.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp src/testlib/qtestlog.cpp src/widgets/dialogs/qfiledialog.cpp src/widgets/kernel/qwindowcontainer.cpp tests/auto/corelib/tools/qcollator/tst_qcollator.cpp tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp Change-Id: Ic5d4187f682257a17509f6cd28d2836c6cfe2fc8
| * Add missing private headers warningSamuel Gaist2014-09-042-0/+22
| | | | | | | | | | Change-Id: I7a4dd22ea3bcebf4c3ec3ad731628fd8f3c247e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Support antialias and rgba Xft settings as used by GNOME and UNITYAllan Sandfeld Jensen2014-08-181-17/+52
| | | | | | | | | | | | | | | | | | We only parsed the hintstyle from the Xft settings. This patch adds parsing for also subpixel style and disabling antialiasing. Task-number: QTBUG-27106 Change-Id: Icdb88ccc10e50d76eb30a5b126bee7590e257022 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Support autohint and lcdfilter fontconfig configurationAllan Sandfeld Jensen2014-08-161-0/+20
| | | | | | | | | | | | | | | | | | This patch adds support for reading autohint and lcdfilter settings from fontconfig and pass them on to freetype. Task-number: QTBUG-32254 Change-Id: Iaa69b70f7005ee7f21126a8d984c07b3a46a3e7f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Move SubpixelAntialiasingType from QFontEngineFT to QFontEngineAllan Sandfeld Jensen2014-08-141-30/+30
| | | | | | | | | | | | | | | | | | | | | | To be able to use the SubpixelAntialiasingType enum without depending on QFontEngineFT we need to move it to QFontEngine. The patch also cleans up the left-overs of other enums moved the same way. Change-Id: I025bc8a5b429d376cfab0a643121ed6f99204988 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | Add QFont strategy to disable subpixel antialiasingAllan Sandfeld Jensen2014-08-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | This patch adds the option to disable subpixel antialiasing on QFont basis. This can be useful when painting to offscreen surfaces. On OS X this option disables the aggressive LCD font smoothing, which can be necessary for certain fonts it may otherwise ruin. Task-number: QTBUG-40396 Change-Id: I1664b636520ae63ee1503b5df7436748106b9f5c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-05-221-0/+3
|\| | | | | | | Change-Id: Ia36e93771066d8abcf8123dbe2362c5c9d9260fc
| * Fix crash when loading invalid font data in QRawFontEskil Abrahamsen Blomfeldt2014-05-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When passing invalid data to QRawFont, we need to fail gracefully and mark the font as invalid, instead of crashing. This crashed because of different missing sanity checks in the Windows and FontConfig font databases. [ChangeLog][Text] Fixed crash when trying to load a font from invalid data. Task-number: QTBUG-37190 Change-Id: I62c81217ec7d873350b575c9d4ae8e6f0a939540 Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* | qpa: Clean up and refactor qfontengine_qpaTor Arne Vestbø2014-05-153-4/+3
|/ | | | | | | | | | | QFontEngineQPA was really QFontEngineQPF2, and has been renamed. The multi font engine in qfontengine_qpa.cpp was really a base implementation of a multi font engine, used by other multi font engines, and has been renamed and moved accordingly into qfontengine_p.h/cpp. Change-Id: Iac7409c4dbf0fdc3ee993ce4f7dc96cb00a422e6 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fix application font removal when using FontConfigFabian Bumberger2014-03-271-108/+112
| | | | | | | | | | | | | | | | | This patch fixes an issue when a font that was added with QFontDatabase::addApplicationFont can not be removed any more. The reason for that is that QFontconfigDatabase::addApplicationFont adds the font to the FontConfig application set from where it cannot be removed any more and is picked up every time the font database is repopulated (e.g. after a call to QFontDatabase::removeApplicationFont). This also fixes the QFontDatabase autotest which unfortunately does not fail on linux, because it tries to add "FreeMono" (which in most cases is already there as a system font). So this patch removes FreeMono and adds LED_REAL as test font. Change-Id: I70fc823075923aa426da1eb3e052affcc416e399 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Apply fontconfig settings to custom fontsAllan Sandfeld Jensen2014-03-222-0/+51
| | | | | | | | | | | 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>
* Cleanup and refactor QFontconfigDatabase::fontEngineAllan Sandfeld Jensen2014-03-211-65/+74
| | | | | | | | | | | | Refactors the logic to parse the font configuration from fontconfig, so that it maybe reused for custom fonts in a later patch. Also fixes a minor mistake that meant we defaulted to medium hinting, where we tried to default full hinting. Change-Id: I1e135b8b1e3faeb213aa370ea59ebde3a671273d Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Revert "Fix application font removal when using FontConfig"Eskil Abrahamsen Blomfeldt2014-02-251-128/+112
| | | | | | | | | | | | This reverts commit a4ff400e25c76a32ec8252285dda043f07b19c15. The patch caused a regression for bold fonts which is currently blocking the alpha of Qt 5.3, so lets revert it and try resubmitting a fixed version later to avoid delaying any release. Task-number: QTBUG-36929 Change-Id: I8d474b09b2270eb2f861853e60605429be08e2d9 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Decrease code duplicationKonstantin Ritt2014-02-062-12/+3
| | | | | | | | 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>
* REG: Fix font matching in FontConfigEskil Abrahamsen Blomfeldt2014-01-291-0/+4
| | | | | | | | | | | | | | | Change a4ff400e25c76a32ec8252285dda043f07b19c15 exposed a bug in the font matching in the FontConfig engine. FcFontMatch is documented to not work unless you call FcConfigSubstitute() and FcDefaultSubstitute() on the pattern first. We were neglecting to do this, but hiding the bug before since we were doing our own font matching and never reading back the file name from FC's match. When we started doing this, suddenly DejaVu Sans (for instance) would match its bold variant instead. Change-Id: Ie6b7026de24cfb0353dc892fa862d6ee79604f38 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fix application font removal when using FontConfigFabian Bumberger2014-01-281-112/+128
| | | | | | | | | | | | | | | | This patch fixes an issue when a font that was added with QFontDatabase::addApplicationFont can not be removed any more. The reason for that is that QFontconfigDatabase::addApplicationFont adds the font to the FontConfig application set from where it cannot be removed any more and is picked up every time the font database is repopulated (e.g. after a call to QFontDatabase::removeApplicationFont). This also fixes the QFontDatabase autotest which unfortunately does not fail on linux, because it tries to add "FreeMono" (which in most cases is already there as a system font). So this patch removes FreeMono and adds LED_REAL as test font. Change-Id: I2fa5f4df0ad2099ac28673760ea25234c725dfc6 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Improve mapping between Font Config and Qt font attributesRoger Maclean2013-10-271-17/+50
| | | | | | | | | | | | | | | | | | | | | | | It was sometimes impossible to select the desired font due to the code completely ignoring the FC_WIDTH attribute and poor mapping of the FC_WEIGHT attribute. The result was that it was easy to have a font file that was inaccessible by Qt since it shared attributes with another font file. The FC_WIDTH attribute is now fetched and used unchanged as the font's stretch value other than ensuring it is within the allowed range. For FC_WEIGHT, the code no longer matches the value with the closest QFont::Weight enum but instead does a piecewise linear mapping so that Qt enum values match Font Config ones to the extent possible. Also removed bogus call to fetch the width that was doing nothing with it. Change-Id: Id39715f14a617c1d0e00ecf5a7d391cab99adc03 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Merge branch 'stable' into devSergio Ahumada2013-09-131-0/+8
|\ | | | | | | | | | | | | | | Conflicts: src/concurrent/qtconcurrentmedian.h src/corelib/itemmodels/qabstractitemmodel.cpp Change-Id: Iac46a90bbb2958cef7670031a4b59c3becd8538a
| * QRawFont::fromFont does not get antialias setting from fontconfigAllan Sandfeld Jensen2013-09-091-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | When creating a fontengine in QFontconfigDatabase::fontEngine we solely base the antialias setting on the QFont StyleStrategy and forget to ask fontconfig it has an overriding definition for this font match. This patch will now let fontconfig decide the antialias setting unless the NoAntialias stylestrategy has been set. Change-Id: I67981582a37cfd3c59aa1db929095585af554088 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.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>
* | QFontConfigDatabase: Minor code clean-upKonstantin Ritt2013-09-131-22/+10
| | | | | | | | | | | | | | | | Get rid of duplicated includes, useless defines, and private enums that just duplicate a public ones; avoid variable names collisions. Change-Id: I540e812b6cd510eb1ed441d97e9af377611d804a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Make QFontEngine not derive from QObjectKonstantin Ritt2013-09-101-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Whilst having the objectName set for each engine is somewhat handy when debugging, deriving from QObject just for that is a wasting of memory in all other cases. This also broke the font engine abstraction by allowing qobject_cast() to access some private data; the only sane way to distinguish engines is querying their Type value. Change-Id: Ib1d195692859eb39089f6d8d9016cb8f9dcc0400 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | API-cleanup: Add QPlatformFontDatabase::registerAliasToFontFamily().Friedemann Kleint2013-07-161-3/+1
|/ | | | | | | | Unexport free function qt_registerAliasToFontFamily() and Make it a static member of QPlatformFontDatabase instead. Change-Id: I1df49a8e37a24b3961f92288d67b6f1108a7d520 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Windows font database: Resolve aliases for extra fonts.Friedemann Kleint2013-07-111-1/+4
| | | | | | | | | Ensure QFontDataBase::hasFamily() deals with aliases. Task-number: QTBUG-31689 Change-Id: Ia59bfcb93362ac9343c6d30dab1091a4db482dfa Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Speed up font database loading with fontconfigLars Knoll2013-07-061-89/+7
| | | | | | | | | | | | | Trust fontconfig if it claims that the font supports a language and don't use the expensive check for a symbol font in this case. Speeds up app startup if the system has many latin only fonts installed by a big amount. Also remove some compat handling for fontconfig versions from 2003 and earlier... :) Change-Id: I5de0812685ae76090b2c0ef5b6c2dcf430249bb8 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix QFontConfigDatabase crashRafael Roquetto2013-05-011-2/+2
| | | | | | | | Take into account the possibility that the target platform plugin does not support platform services. Change-Id: I48e7fac2e1230a9a7d450414044d23ed26b334be Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Read correct font hinting config on Gnome/UnityEskil Abrahamsen Blomfeldt2013-04-221-0/+19
| | | | | | | | | | | | | Fixes regression against Qt 4. This tries to recreate the logic from 5c46d9a4c85abbcc0b5db2bbbafded3efd784cd9 in Qt 4, where we on Gnome would override the default hint style specified in FontConfig with Xft.hintstyle settings. This is the configuration used for changing the hint style in the Gnome Tweak Tool. Task-number: QTBUG-29582 Change-Id: I6b9fe2c8ff55ff080d034e5a53fc8cbb49f7651f Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* QFontConfigDatabase: Fix performance regressionKonstantin Ritt2013-04-161-2/+16
| | | | | | | | | ..introduced by 244cc5da55b92bf08f32da01d7557decbd9ba66c Symbol fonts usually don't have code ranges support except Latin. Don't load FT face for font that doesn't look like a symbol font. Change-Id: Iec46aa84e27227e0bda5d50f96a2b2f75f58e950 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* QFreetypeFace: Fix getFace() uses UTF-8 paths on non UTF-8 localesKonstantin Ritt2013-04-111-2/+2
| | | | | | | | | | 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>
* Fix QFontconfigDatabase unable to fallback to a localized familyKonstantin Ritt2013-04-111-0/+5
| | | | | | | | | | | | | | | | When populating the font database, FcPatternGetString(FC_FAMILY) gets a localized font family name; but, in fallbacksForFamily, it gets a non-localized font family name, so it unable to find the proper font to fallback. Simply register all family name variants as aliases to localized name and make sure they are checked when getting fallback families. Task-number: QTBUG-28806 Task-number: QTBUG-30415 Change-Id: I71c03ae9b51a28736c2576f3442f1bbdb3497c09 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: jian liang <jianliang79@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* QFontConfigDatabase: fix fallbacksForFamily() for CJK languagesKonstantin Ritt2013-04-011-4/+4
| | | | | | | | | | For Han Unicode script, the language couldn't be determined algorithmically, the only way is guessing based on the user's locale. The is a regression introduced in 9b0fab6b62df98519ebfab117f14b9d3465d8c68 Change-Id: I84645885a825fdfb6c268edaf10185bf5e447eb5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* FontConfig: Correctly report Symbol writing system supportEskil Abrahamsen Blomfeldt2013-03-261-0/+23
| | | | | | | | | | | When all the Q_WS_X11 were removed, we also removed the special case for symbol fonts in QFontDatabase for FontConfig. This was checkSymbolFont() in Qt 4, and this patch copies the code and adapts it to Qt 5. Task-number: QTBUG-30044 Change-Id: I346f208052013eae9de3c33c210bf5db1d2aef87 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.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-224-4/+4
|\ | | | | | | | | | | | | | | | | | | 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