summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/fontdatabases
Commit message (Collapse)AuthorAgeFilesLines
* Update contact information in license headers.Jason McDonald2012-01-239-9/+9
| | | | | | | 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-059-9/+9
| | | | | 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>
* Cocoa: Add autorelease pools.Morten Johan Sørvig2011-12-121-2/+2
| | | | | | | | | | | | | A couple of cases where we call Cococa APIs without having an autorelease pool in place surfaced after removing the global autorelease pool in 1a218a7. (This happens when when Qt API is called before app.exec() has started the Cocoa event loop.) Add local autorelease pools to prevent memory leaks. Change-Id: I0c4be3ff102aaff4539235857f95ab29fdbc9d70 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* Remove QCoreTextFontEngineMultiJiang Jiang2011-12-042-357/+0
| | | | | | | | It's not used anymore since we have switch to HarfBuzz on Mac. Change-Id: I68252fbe3021f54dacac5a901184c3f3e541a6b7 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Enable subpixel rendering for raster on MacJiang Jiang2011-12-042-1/+11
| | | | | | Change-Id: I06e6465e03c17776974d361254abf5b750736080 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Add QRawFont from data support to Mac font dbJiang Jiang2011-12-012-0/+24
| | | | | Change-Id: I02f1c4b35b9ed585e72aa4bad9b75d3c098f8e62 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Set supporting writingSystem correctlyJiang Jiang2011-12-011-1/+2
| | | | | Change-Id: I963aa7b69a48441619c5885c443ae2620fcc4e57 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Mac Core Text font database for QPAJiang Jiang2011-11-306-3/+1451
| | | | | | | | | | | | | | Add Core Text fontdatabase for Mac and use it as default. It also reenabled Core Text font engine for native font rendering on Mac, though it's not used in declarative UI (by default declarative will still use scenegraph, which will only use this font engine for retrieving font metrics and outlines). With the new fontdatabase it's now possible to load all the fonts installed in the system as well as adding application fonts. Change-Id: I0d2aa1420019adf6d0f70dd147a9d71b2684d3f1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fixed compile of QtPlatformSupport with -qtnamespace.Rohan McGovern2011-11-172-0/+8
| | | | | | Change-Id: Iba411d35abe85ecf29a44d99113954a0561ae286 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: hjk <qthjk@ovi.com>
* Provide defaultFont with fontconfig dbJiang Jiang2011-11-152-2/+10
| | | | | | | | | | | 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>
* 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>
* Fix symbol fonts support with FT engineJiang Jiang2011-11-112-0/+6
| | | | | | | | | | | | 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-042-25/+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>
* Use freetype font engine on WindowsOlli Werwolff2011-10-106-21/+26
| | | | | | | | | | | | | | | 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>
* Add font family alias resolving to QPAJiang Jiang2011-10-052-0/+19
| | | | | | | | | | | 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-233-5/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Make sure libQtPlatformSupport has proper flagsJiang Jiang2011-09-171-0/+1
| | | | | | | | | | | If we don't have Q_FONTCONFIGDATABASE flag, QGenericFontDatabase will be defined to QBasicUnixFontDatabase even when fontconfig is available. Change-Id: I0e79ed8488163cea32352e3fc300acd92ca4bd93 Reviewed-on: http://codereview.qt-project.org/4962 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Compile in C++0x modeLars Knoll2011-09-171-4/+8
| | | | | | | Change-Id: If97bdd94a51756e48167990a4014ba1059d0a507 Reviewed-on: http://codereview.qt-project.org/5026 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Avoid fontconfig access in fontEngine creationJiang Jiang2011-09-172-43/+25
| | | | | | | | | | | | 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
* Mac: make platformsupport a static libMorten Sorvig2011-09-011-4/+0
| | | | | | | | | | | | | | | The "force framework/no-framework" logic does not really work, since Qt is now a mix of frameworks and statics libs. Remove this code path and use the "detection" path instead. Also remove the exports from platformsupport. Change-Id: I0a308666480445eb47c4f443ff7529addecad10d Reviewed-on: http://codereview.qt.nokia.com/3464 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix some compiler warnings, shut up QIbusPlatformInputContext.Friedemann Kleint2011-08-261-0/+1
| | | | | | Change-Id: Idadf40b2bbe53928d8577a099f38a2be0a2d6e16 Reviewed-on: http://codereview.qt.nokia.com/3640 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Support QRawFont from raw data with basic unix font dbEskil Abrahamsen Blomfeldt2011-08-252-0/+67
| | | | | | | | | | | | Add support for making a QFontEngine in QPA with the basic unix font database. The code is copy-pasted from qrawfont_ft.cpp. Task-number: QTBUG-20780 Change-Id: Id5492efe634fe90805fbca43356ec428d4d73117 Reviewed-on: http://codereview.qt.nokia.com/3511 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Just change includes to be have <> brackets instead of ""Jørgen Lind2011-08-241-2/+2
| | | | | | | | | for QGenericFontDatabase Change-Id: Iac61522194ab7aa3ea7359e51cc84952db8b90ae Reviewed-on: http://codereview.qt.nokia.com/3471 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Fix fallbacksForFamily in QBasicUnixFontDatabaseJiang Jiang2011-08-242-2/+2
| | | | | | | | | | | | So that this function instead of the one in QPlatformFontDatabase will be called. Change-Id: Ifdb75ada27723c688e42067c7633b08391d66467 Reviewed-on: http://codereview.qt.nokia.com/2696 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com> Reviewed-on: http://codereview.qt.nokia.com/3461 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix weight parsing in QBasicUnixFontDatabaseJiang Jiang2011-08-241-0/+27
| | | | | | | | | | | | | First check the usWeightClass in OS/2 font table, then check the weight byte in panose structure because Nokia Pure Text fonts only have that set correctly. Change-Id: Idce2626c8df17ce74ba78b317846cb42c3f1fe84 Reviewed-by: Jørgen Lind Reviewed-on: http://codereview.qt.nokia.com/2682 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-on: http://codereview.qt.nokia.com/3460
* Compile fix for platformsupport on Mac.Morten Sorvig2011-06-211-0/+4
| | | | | | | | | | Switch platformsupport over to be a shared library, which is well supported by the build system. This requires exporting classes we use. I've done this on OS_MAC only for now. Reverts 4581a9999e12e14bbf0836d0740191ba50109540
* Compile fix, and remove warningsJørgen Lind2011-06-102-4/+3
|
* QtPlatformSupport: A helper library for platform pluginsJørgen Lind2011-06-109-0/+1203
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