summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix the build of -qt-freetypeThiago Macieira2012-03-221-1/+0
| | | | | | | | | | | The symbol must be exported from QtGui for the plugins to be able to see it. Also, fix the build in namespaced case: cannot use extern in QtPlatformSupport because it's not compiled into the Qt namespace. Change-Id: I029533f3524e3cbf6c87aed79c1f2e7b55aebb9b Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix a typo in QFontconfigDatabaseJiang Jiang2012-03-201-2/+1
| | | | | | | | Font family names for default families (Serif, Sans serif, Monospace) was only taken from the first family in the array (aka. always Serif). Change-Id: Ia326dc85e03819f1a72deda66aade348809d94da Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Use the lazily-queried families for all QPA multi font engines.Pierre Rossi2012-03-141-3/+2
| | | | | | | | | This is the approach introduced together with the WebKit "backdoor" that lets us use QRawFont with QTextLayout. We could use it all over the place and share more code. Change-Id: Ie1963679755f37ba9204d67554a163f1d1115604 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix QFont hinting preference with fontconfigBalazs Kelemen2012-03-121-18/+31
| | | | | | | | Consider if the hinting preference of the QFont is not PreferDefaultHinting. Change-Id: I0f50b320356787b6c1eabee5f009e7d326a06925 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>
* Avoid loading and keeping unused fallback font enginesEskil Abrahamsen Blomfeldt2012-02-171-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | When we request glyphs from fallback fonts, we would potentially load all fonts on the system into memory. This is especially true for glyphs that are not supported by any font (or by the last in the list) in any "Common" script (which e.g. includes CJK). This would make any application which tried to display unsupported glyphs use huge amounts of memory for keeping unused fonts cached, only limited by the number of fonts on the system. The patch contains two solutions: First, before loading the font, the multi font engine will be asked whether it needs to be tried for the given character. By default, this will always be true, so all fonts will be tried, but with the new font config multi engine in the platform plugin, it will ask FontConfig whether the font contains a glyph for the character. Should the font be loaded and still fail to resolve the character (which could be the case for other platforms), we will simply delete it again immediately instead keeping it cached. Change-Id: I92dfb39289a359f49caa02c2caf8baf66098fb59 Reviewed-by: Lars Knoll <lars.knoll@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 rare crashes in fontconfig fontdb due to uninitialized variableSimon Hausmann2012-01-041-1/+1
| | | | | | | | | Initialize the out variable passed to FcPatternGetString to protect against the "failure" case. Otherwise the subsequent QString::fromUtf8 is called with an uninitialized pointer. Change-Id: I31b8b4c366f673609b26eca162334fd8bc9f25d2 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fixed compile of QtPlatformSupport with -qtnamespace.Rohan McGovern2011-11-171-0/+4
| | | | | | Change-Id: Iba411d35abe85ecf29a44d99113954a0561ae286 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: hjk <qthjk@ovi.com>
* Provide defaultFont with fontconfig dbJiang Jiang2011-11-151-2/+9
| | | | | | | | | | | So that it won't just return "Helvetica" that may not exist in target system. Providing it seems to fix QTBUG-21833 as well, thus we can remove the QEXPECT_FAIL statement in qlistview test. '_' appears to reach the minimum right bearing in some fonts. Task-number: QTBUG-21833 Change-Id: I2340af6ee736083ec4f6575e469840ebec4e545e Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix symbol fonts support with FT engineJiang Jiang2011-11-111-0/+5
| | | | | | | | | | | | It appears that the symbol_map we obtained with FreeType doesn't work for common symbol fonts like Wingdings, in previous X11 code we use the code path with normal charmap, to enable it we need to make sure QT_NO_FONTCONFIG is not defined. And since the FcCharset functions doesn't really operates on the font database, we can safely skip the mutex calls. Change-Id: I8c484de200be1d47c053b10be2c51d2273dcd359 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Restore subpixel rendering support with fontconfig and FreeTypeJiang Jiang2011-11-051-6/+33
| | | | | Change-Id: I45cf83374ba5a8b1ae88415950c1e5ab72991598 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Revert "Avoid fontconfig access in fontEngine creation"Jiang Jiang2011-11-041-24/+43
| | | | | | | | | | | 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>
* Add font family alias resolving to QPAJiang Jiang2011-10-051-0/+18
| | | | | | | | | | | By default it doesn't do anything special, but for fontconfig font db it will do some tricks to convert alias like serif to actualy font family names like Times. Change-Id: I73058d187a5422e6f93bc1b728cecdc0250d5e1e Reviewed-on: http://codereview.qt-project.org/5984 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Support adding application fonts with QFontconfigDatabaseJiang Jiang2011-09-231-4/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFontDatabaseQPA should be able to reinitialize database and reregister all the fonts when an application font is added, because it will trigger db->invalidate(). Add cloneWithSize support to QFontEngineBox so that even no usable font is found in QFontDatabase, QRawFont::setPixelSize can still work (without making the result rawfont invalid). Register application fonts with QFontconfigDatabase, the code is adapted from QFontDatabaseX11. Reenable QRawFont tests for QPA, these usages are now supported in QPA. Fix QStaticText tests, raster in QPA does support transformations. Translate the text before ZAxix rotation so that it will be visible in canvas. Add back fixedPitch support to QPA, and fix QFontDatabase tests. Fix QGlyphRun tests, ignore non-existence glyphs in alphaMap locking. Fix QFontMetrics tests. Task-number: QTBUG-21415, QTBUG-20754, QTBUG-20977, QTBUG-20976, QTBUG-20760, QTBUG-20759 Change-Id: I24aea7d6ec6b2ac6342134d1f2591327c23a692b Reviewed-on: http://codereview.qt-project.org/5384 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Avoid fontconfig access in fontEngine creationJiang Jiang2011-09-171-43/+24
| | | | | | | | | | | | The only thing we need to know at fontEngine creation is the hinting style, we can just store it in enumeration process and get it back from user data pointer. So that fontEngines can be created without access to fontconfig at all. (Since we are doing our own matching.) Change-Id: I5ab2d1f27e28787447aedcbdef16555fb0f1b604 Reviewed-on: http://codereview.qt-project.org/4769 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Merge branch 'master' into refactorGunnar Sletta2011-09-121-19/+22
| | | | | | | | | | | | | Conflicts: src/3rdparty/v8 src/gui/text/qfont_qpa.cpp src/gui/widgets/qlinecontrol.cpp src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.cpp tests/auto/gui.pro tests/auto/network.pro tests/auto/qstring/tst_qstring.cpp Change-Id: Id118c172645303ccf06a207050d5bf1462ff57fe
* QtPlatformSupport: A helper library for platform pluginsJørgen Lind2011-06-101-0/+601
QtPlatformSupport is a static library. Platform plugins are meant to link against this library to pull in dependencies such as fontengines and convenience functions for finding the right GL configs. The linker will only pull in the symbols used, so the size of the library doesn't really matter