summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/fontdatabases
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-162-2/+26
|\ | | | | | | | | | | | | Conflicts: src/widgets/styles/qstyleanimation.cpp Change-Id: Iae570895be6544de80f9c1ec309d1a08c59daff8
| * Fix crash when trying to create paths for color-glyphs (Emoji) on MacTor Arne Vestbø2013-01-142-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | CoreText segfaults when creating paths for color-glyphs: 0 0x00007fff8fd41e69 in TFont::FindColourBitmapForGlyph () 1 0x00007fff8fd417ac in TFont::CreatePathForGlyph () 2 0x000000010567d1af in QCoreTextFontEngine::addGlyphsToPath (...) So we shortcut the code-path, since we don't support Emoji yet anyways. Task-number: QTBUG-28615 Change-Id: Ife16ae4959077d9eaaf6ea5cd1f27a4e2e01e7f5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | CoreText: Add support for providing scaled glyphs to the glyph-cacheTor Arne Vestbø2013-01-152-2/+11
| | | | | | | | | | | | | | | | Useful for not having to fall back to QPainterPath drawing when using the raster engine with a retina screen (which has a 2x scale). Change-Id: I0a9f754d31b0ecd8e8daf7a01331d19716bab680 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Refactor paint/font-engine shouldDrawCachedGlyphs and supportsTransformationsTor Arne Vestbø2013-01-102-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some cruft had built up over time, and this is an attempt at cleaning up the naming and use of these functions, and should not have any behavioral effects. The function supportsTransformations() has been renamed in QPaintEngineEx to reflect its use, which is to decide if QPainter needs to pre-transform the coordinates of the static text before asking the paint-engine to draw it. The new name is requiresPretransformedGlyphPositions(). The OpenGL and CoreGraphics (Mac) paint engines keep their behavior of not needing pre-transformed text, while the raster engine needs this when using cached glyphs. The base-class implementation assumes that all transforms that include a projection will need pre-transform, which is also the case for the raster engine. All decisions in the paint engines about whether or not to use the glyph cache when drawing text are now deferred to the function shouldDrawCachedGlyphs(), which has been refactored for the GL paint engine(s) to share more logic. All implementations call the base class implementation, which ensures that large font sizes will not be cached. The raster engine will in addition ask the font engine whether or not it can produce glyphs for the glyph-cache with the given transform. This is the only remaining instance of the supportsTransformations() function, and will for all font engines except the CoreText engine support affine transformations. The CoreText engine on the other hand only supports translations (for now). Change-Id: I8fb5e43e3de3ef62a526a79a6dfeda7f9546771d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Merge branch 'stable' into devFrederik Gladhorn2013-01-044-8/+12
|\| | | | | | | | | | | | | | | | | | | | | 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-143-7/+12
| | | | | | | | | | | | | | | | | | 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>
| * properly syncqt-ize harfbuzz headersOswald Buddenhagen2012-12-041-1/+0
| | | | | | | | | | | | | | | | | | we were already installing them into QtCore/private, so turn them into proper private headers to start with. this cleans up our project files. Change-Id: I0795f79e03b60b5854de9e4dc339e9b5a5e6fd87 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Skip FcCharSetHasChar() callKonstantin Ritt2013-01-021-1/+1
| | | | | | | | | | | | | | ...if writing system is already known to be supported Change-Id: Id7ea11e92507a283b2fba2ad944dd0a9772e484d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Update Qt internals to use QChar::ScriptKonstantin Ritt2012-12-216-64/+107
|/ | | | | | | | | | | | | | ...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>
* default to Regular font with FontConfigMichał Sawicz2012-11-231-5/+5
| | | | | | | | | | | | | | | Default to Regular/Normal instead of Medium in QFontConfigDatabase. Requesting Medium as default was fine until the font actually provided a Medium font, at which point it was selected by default. Tweak the buckets so that Medium has preference over Bold when DemiBold is requested. They will have to be extended for Medium when QTBUG-25814 is resolved. Change-Id: I111b7f99083d50c3e8264f84f10a997f619ef4b3 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix transformed text on Mac OS XEskil Abrahamsen Blomfeldt2012-11-232-0/+7
| | | | | | | | | | | | | | | | | In change 1582407fc782c0befd0760633324dd5c206524a1, the Q_WS_MAC code path which disabled drawing cached glyphs for any transform was removed, as was the comment that scaling and rotation wasn't supported by the Mac font engines. This obviously broke transformed text on Mac, so we need to put it back. I put it into the font engine itself where it belongs, and I kept the somewhat confusing naming convention which is used in the paint engine to minimize this patch. I'll clean up these function names in a future commit. Task-number: QTBUG-27362 Change-Id: I4fc6a503eedd4b1ebaf3ee659d948f997f433338 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Mac: fix invalid context in imageForGlyphTeemu Katajisto2012-11-211-1/+1
| | | | | | | | | | | | The bounding rectangle may have negative width or height when a graphics view with text is rotated in certain angles. Make sure that the image width and height are positive, otherwise the context will be null and the following messages can be seen in test logs: <Error>: CGContextSetFontSize: invalid context 0x0 Change-Id: I10f83f6909035fb3c4ac456123cf1922eaea7c73 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.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>
* Fix for compiling with clang with c++11.Erik Verbruggen2012-11-061-1/+1
| | | | | Change-Id: I4f4928783d0e35b0df5e979fef1de80e9a026f55 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: make text subpixel rendering check to work for non-Apple displaysTeemu Katajisto2012-11-031-16/+38
| | | | | | | Task-number: QTBUG-27386 Change-Id: I4e12663f80060dfcea6970a705861af388d816ac Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Mac: Correct writingSystem check value for ChineseLiang Qi2012-10-301-2/+2
| | | | | | | | | | | | | For simplified and traditional Chinese. Based on the Apple doc: Internationalization Programming Topics - Language and Locale Designations. Task-number: QTBUG-27130 Change-Id: I677563525edd607583561be20f4dbed24b2443a5 Reviewed-by: Jiang Jiang <gzjjgod@gmail.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Cocoa: fix coretext memory leaksTeemu Katajisto2012-10-192-0/+3
| | | | | Change-Id: Id85dbf8a2ea8994d9fca07d3f10b43f62ec305a0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2211-265/+265
| | | | | | | | 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 printing with OS X platform pluginEskil Abrahamsen Blomfeldt2012-09-101-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Since we do not pass in the destination dpi to CoreText when making the font, we need to pass in a point size which is scaled to include the dpi change. The default dpi for the screen is 72, thus the scale factor is destinationDpi/72. Since pixelSize = pointSize / 72 * dpi, the pixelSize is actually the scaled point size for the destination dpi, thus we pass in that instead. Note that this only works because the default screen dpi on Mac is 72. You can look at the CoreText font database in Qt 4.8 to verify that the same trick is used there. When 96 dpi is explicitly set (specifically for autotests), we need to fall back to the old behavior, since the OSX platform plugin will then use 72 for some fonts and 96 for others making it impossible to detect the DPI in a consistent way. The correct fix would be to pass in the dpi to the function, but until that fix can be made, we just use the old code to keep the autotests passing. Task-number: QTBUG-25555 Change-Id: Id20a273549c3abf3db56ef1c48553c0958c48d61 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Fix rounding error when drawing scaled text on OS XEskil Abrahamsen Blomfeldt2012-09-101-6/+6
| | | | | | | | | This especially affected the print preview dialog, where certain characters would be grossly mispositioned. Task-number: QTBUG-27131 Change-Id: I385474a6f609a8f4291988206c7e63a0747673dd Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Removing duplicate includesSergio Ahumada2012-09-091-1/+0
| | | | | | | Do not include a header more than once Change-Id: Ia2e5d66e72988ad833cf5177a3f8aa988bf510e9 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Replace deprecated ATS calls with CTFontManager calls in 10.8Jiang Jiang2012-08-211-1/+48
| | | | | Change-Id: I81c0361059319575e55621123d40b7c6f3c6b699 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.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>
* Fix the UCS-2 surrogates handling in Q*FontEndine*::stringToCmap()Konstantin Ritt2012-07-101-0/+2
| | | | | | | | | by making sure QGlyphLayout's numGlyphs member is properly initialized if the string-to-glyphs lookup was successful (tip: a surrogate pair produces a single glyph index). Change-Id: I01953f3b6281d79e1a214bfab0424e796d94769a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Move ShaperFlags enum from QTextEngine to QFontEngineKonstantin Ritt2012-07-102-6/+6
| | | | | | | | These flags are specific to font engine(s) and has nothing to do with the text engine or the text layout. Change-Id: I4bb793c3c634b3cf0ae0a8a8c23b946fad5874b6 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fix Mac support for glyph scalingJiang Jiang2012-06-052-7/+19
| | | | | | Change-Id: I9ac9da86c38e9313c6219b8049e46b6b58fa6731 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Make font fallback list for common script locale awareJiang Jiang2012-06-011-0/+13
| | | | | | | | | | | | Even in common script we may need to have a preferred font list (which font should be used for CJK codepoints, Chinese, Japanese or Korean? Since the codepoints they cover may overlap.) Adding current default language into the pattern in that case will give a better recommendation for the fallback list if the system have configuration files like that. Change-Id: Idbc7f7b0cf24108d6cc255a1add0b29b730588c0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Make fontconfig default font locale awareJiang Jiang2012-05-311-1/+24
| | | | | | | | | | | Application default font should be locale aware in fontconfig db as in other font databases. We use a hack to obtain the system default language parsed by fontconfig and use that to find out the preferred font for a given language (such font list is edited by fontconfig from fonts.conf in FcConfigSubstitute() process). Change-Id: I99bb8dd29d2dde2c8019ed8e77f5bfc09ddf3ca5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix surrogate pair handling in QCoreTextFontEngineJiang Jiang2012-05-231-5/+31
| | | | | | | | | The number of glyphs returned should take surrogate pairs into account. The glyphs array and advances array as well. This follows the approach in QFontEngineFT in general. Change-Id: Ic53faa5e38c2219b987d76aec434558dad92015a Reviewed-by: Zeno Albisser <zeno.albisser@nokia.com>
* Populate the font database when calling fallbacksForFamily().Zeno Albisser2012-05-161-0/+2
| | | | | | | | The Mac platform requires populating the font database to build the fallback list for font families. Change-Id: I5bd63cd3c5fa6216c312d439390681f160a716fb Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Do not use charset loaded by fontconfigJiang Jiang2012-05-112-15/+4
| | | | | | | | | | | | | | | | | | The only use for storing charset loaded by fontconfig in font engines is for determine if a font supports certain codepoint, however FreeType already does that. The charset loaded is sometimes not complete, for instance in fontconfig 2.9.0 it removed Apple Roman platform support for cmap loading, thus results a regression in common symbol fonts (Wingdings, Webdings) rendering. Because those symbol fonts produced by Monotype only contain two cmap tables: Apple Roman and Microsoft Symbol, since the Microsoft Symbol table has a weird 0xF000 offset, we always fallback to the Apple Roman cmap table. Removing freetype charset cache also make each font engine consuming less memory. Change-Id: I88f3f44981f3a1c517b84809a3f5b834ffff7681 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Expose QPA API under qpa/*Girish Ramakrishnan2012-05-075-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Change coreservices -> iosIan Dean2012-04-194-6/+6
| | | | | | | | Replace "contains(QT_CONFIG, coreservices)" with "!ios" in config files. Replace "QT_NO_CORESERVICES" with "Q_OS_IOS" in source files. Change-Id: Id3b02316b245a24ce550e0b47596d18a4a409e4f Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Added iOS compatibility.Qt4iOS2012-04-134-0/+20
| | | | | | | | Put MacOS-specific code in #ifdef blocks so that it is not compiled for iOS. Add iOS implementation for MacOS-specific code, where possible. Change-Id: I3664c76fcfa8d5497ad1db676b9331e4ae0dca0e Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Make it possible to enable non-scalable font scalingMiikka Heikkinen2012-04-102-0/+13
| | | | | | | | | | | | | | | | | | | Windows native font engine supports scaling of non-scalalble fonts, so make it possible to do so. Added two functions to QPlatformFontDatabase: fontsAlwaysScalable() and standardSizes(), and made fontsAlwaysScalable() to return true for Windows native font database. Windows Freetype font engine doesn't seem to support scaling of non-scalable fonts, so didn't enable it in there. Added implementation of standardSizes() for Mac OS. Task-number: QTBUG-24970 Change-Id: I41c9356ede8a37b7c61db94340dbeb5b629f34b9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Don't hardcode the default families in qfont_qpa.cppPierre Rossi2012-04-101-0/+7
| | | | | | | | | 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>
* Cocoa: silence warnings about unused variablesBradley T. Hughes2012-03-261-1/+1
| | | | | | | | Silence warnings about unused function parameters and local variables while building the Cocoa platform plugin. Change-Id: I6aedc4cb21c5fb48d2d6e501561473d3f7112aed Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Fix for fontconfig 2.9 behavior changeJiang Jiang2012-03-261-11/+9
| | | | | | | | | | | | | | | | Start from 2.9, fontconfig will reset the result to FcResultNoMatch at the beginning of FcFontSort(). According to http://lists.freedesktop.org/archives/fontconfig/2012-March/003857.html the result value of FcFontSort() can be ignored, checking the nfont value of the fontset returned is sufficient. The fix works for pre-2.9 versions as well, since those versions don't touch the result at all. Change-Id: Iba6c1157e314088a90867292a4bd970bb873e284 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 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 cross-compilation that uses fontconfig / freetypeThiago Macieira2012-03-221-0/+1
| | | | | | | | | | | | config.tests/unix/freetype.pri has a !cross_compile flag, so we must find freetype using the proper detection methods. The detection was inside an X11 section of configure, so move that out. And use the results of that detection, now that QMAKE_CFLAGS_X11 isn't used (since we're not building X11 in QtPlatformSupport). Change-Id: Ic8f5cfb7263849bfb12967756def2b5aaa244872 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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>
* Cocoa: set font engine glyph format based on display typeBradley T. Hughes2012-03-203-14/+41
| | | | | | | | | Make the QCoreTextFontEngine::glyphFormat depend on the primary display's subpixel layout (if any). This change also refactors the antialiasing threshold setting to live beside the defaultGlyphFormat. Change-Id: I27f94f775d91d2a68cd647cc24503b31b6ff5e61 Reviewed-by: Morten Johan Sørvig <morten.sorvig@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>
* Use the lazily-queried families for all QPA multi font engines.Pierre Rossi2012-03-144-8/+6
| | | | | | | | | 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 a performance regression with shouldLoadFontEngineForCharacter.Pierre Rossi2012-03-082-14/+38
| | | | | | | | | Calling FcFontMatch should be avoided as much as possible. We can simply cache the patterns it returns, which should still save memory compared to loading all font engines as we did before. Change-Id: I67208a4f919338a948535f717cfd0139dbea2e5f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix support for scripts that require OpenTypeEskil Abrahamsen Blomfeldt2012-03-072-2/+2
| | | | | | | | | 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>