summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/fontdatabases
Commit message (Collapse)AuthorAgeFilesLines
* Decrease code duplicationKonstantin Ritt2014-02-066-30/+10
| | | | | | | | 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>
* Make HarBuzz-NG the default shaper on MacKonstantin Ritt2014-01-311-0/+2
| | | | | | | | | | | | | | | Since we dropped all platform-related shapers during the QPA refactoring, thus making HarfBuzz the only shaper on all platforms, we can not deal with AAT-capable fonts anymore. HarBuzz-NG now supports it's own shaper backend infrastructure, so the decision was to enable HB's CoreText shaper backend on Mac and simply make HB-NG the default shaper there. Task-number: QTBUG-36056 Change-Id: If22e24fd5cc00c25952934332a2f4123f38135a4 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Get rid of QGlyphLayout::advances_yKonstantin Ritt2014-01-301-12/+6
| | | | | | | | | | | | | | | ...and thus consume 4 bytes less per glyph and increase the performance a bit. It seems, the only CTFontGetAdvancesForGlyphs() returns both x and y advances, though y advances are always equal to 0 for horizontal orientation and x advances are always equal to 0 for vertical orientation. Also, rename `advances_x` to `advances` for consistency and declare QGlyphLayout's data size in a single place. Change-Id: I56b20f893f8a6feb7aa870e3edbca99dd93ba2e2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@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>
* Fix nested template declarations for non-C++11 buildsTor Arne Vestbø2014-01-271-4/+4
| | | | | Change-Id: Ie38aae09033a47106a4a1cf2e9997f90961a4e33 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Enable adding/removing application fonts on iOSTor Arne Vestbø2014-01-252-18/+51
| | | | | | | | | | | As CTFontManagerCreateFontDescriptorsFromURL is not available on iOS < 7.0 we unfortunately need to fall back to the old behavior of only adding a single font on older iOS versions. Task-number: QTBUG-34490 Change-Id: I9c37a5cada067a4ebfaa9f04e7a30d41b8945990 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Teach CoreText font db to handle application font files with multiple fontsTor Arne Vestbø2014-01-251-67/+59
| | | | | | | | | | | | | | | | | The ATS code path already did this, by enumerating all the fonts in the resolved collection. The CoreText code path assumed that registering a font URL would only add a single font. We now use CTFontManagerRegisterFontsForURL to enumerate all fonts that were added. This functionality is not available for fonts based on a data provider. As part of implementing the patch the code was simplified to re-use logic between the different ways of resolving font descriptors from a file or byte array. Change-Id: I6eb15df939d03dc588a87e46f39bd54e56b50643 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Use shared list of application fonts in CoreText font databaseTor Arne Vestbø2014-01-252-22/+24
| | | | | | | | Instead of three separate lists depending on the font type. This makes enables sharing more code between the different implementations. Change-Id: If090d1b4a32f035b6344cbadd4c5ba66e0cb99f7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-101-1/+2
|\ | | | | | | Change-Id: I99af0bef7f1c931533a324ebcfb27c40ee871a5e
| * 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>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-11-261-4/+13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the conflicts in msvc_nmake.cpp the ifdefs are extended since we need to support windows phone in the target branch while it is not there in the current stable branch (as of Qt 5.2). Conflicts: configure qmake/generators/win32/msvc_nmake.cpp src/3rdparty/angle/src/libEGL/Surface.cpp src/angle/src/common/common.pri src/corelib/global/qglobal.h src/corelib/io/qstandardpaths.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxscreeneventhandler.h src/plugins/platforms/xcb/qglxintegration.h src/widgets/kernel/win.pri tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp tools/configure/configureapp.cpp Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
| * Keep web fontdata alive as long as CG uses itAllan Sandfeld Jensen2013-10-291-4/+13
| | | | | | | | | | | | | | | | | | | | | | With OS X 10.9 font decoding appears to happen lazily, this means we have to ensure the data we provide CG is kept alive until it dereferences it itself. Task-number: QTBUG-34332 Change-Id: I8fc38fafba746b062c4ad16314b0a410fd0b668d Reviewed-by: Erik Verbruggen <erik.verbruggen@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>
* Fallback to the original application font handlingAndy Shaw2013-10-072-10/+8
| | | | | | | | When Qt is built for 10.8 but then used on a machine before 10.8 then it was not falling back correctly when an application font was added. Change-Id: I0f05226cdbcfa36621bb1b3aa2f2cd60e714dfdf Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* test: fix tst_QFont::defaultFamily on Mac OS X 10.8Liang Qi2013-09-201-30/+30
| | | | | | Task-number: QTBUG-32834 Change-Id: Iac771eb0a544ae58d203717c39a13d2d21e3c3ed Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.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-132-0/+2
| | | | | | | | | | | | 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-132-22/+6
| | | | | | | | | | | | | | | | 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-102-2/+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>
* | Rely solely on alphaMapBoundingBox in QTextureGlyphCacheGunnar Sletta2013-09-052-6/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're currently adding a lot of transparent pixels to the cache, wasting both memory and cpu cycles while drawing. AlphaMapBoundingBox was introduced to return the exact same bounds as the alphaMapForGlyph function so we should only rely on this instead of adding arbitrary padding and margins all over the place. Windows still has an arbitrary +4 in the its drawGDIGlyph() which means batching will not work on windows, but at least now other platforms do not need to suffer. Change-Id: I714903fa195004400c09c3bf6570e46179775f09 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Fix application font population on OS XSimon Hausmann2013-07-312-66/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes two issues that prevented the application font related tests of tst_QFontDatabase from passing: * The code for creating the font descriptor after the registration of an app font with file name using CTFontDescriptorCreateWithAttributes must create a dictionary with kCTFontURLAttribute as key and the CFURLRef pointing to the on-disk file as value. Unfortunately the code mixed up keys and values in the dictionary. * Registration of app fonts within QFontDatabase itself on Windows and Fontconfig platforms works by QFontDatabase calling addApplicationFont on the platform db after calling populateFontDatabase(). It assumes that addApplicationFont on the platform db is capable of registering the font right away. This part was also missing from the Mac implementation and this patch implements it by moving the common registration code from a CTFontDescriptorRef out into a separate method, called from populateFontDatabase() as well as addApplicationFont(). Task-number: QTBUG-23062 Change-Id: Ide5e6bf277d99f3cab50ee0d4631cc3fba6d0d45 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@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>
* Further followup to Q_OS_MACX changes.Jake Petroules2013-06-242-5/+5
| | | | | | | | Flip !Q_OS_IOS conditions to Q_OS_MACX where it seems appropriate, remove a redundant condition in qtextcodec_p.h. Change-Id: I21c8c0c490f1eb4a9337a7f2f3e907c125489438 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* mark private dependencies as suchOswald Buddenhagen2013-05-201-2/+2
| | | | | | Change-Id: Ic93c8dc5aaad3973e4d4fc6bb3b70ad7c0a632b0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@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>
* 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>
* QFontEngine: Fix cache_cost might be not initializedKonstantin Ritt2013-04-141-0/+2
| | | | | | Change-Id: I4cf4de5797e6623a71593e8f382496188e3abac8 Reviewed-by: jian liang <jianliang79@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QFreetypeFace: Fix getFace() uses UTF-8 paths on non UTF-8 localesKonstantin Ritt2013-04-112-3/+3
| | | | | | | | | | 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>
* Make sure that we #include qconfig.h before testing for features.Thiago Macieira2013-03-191-0/+2
| | | | | | | | | | | This is mandatory in public headers (qiodevice.h, qopengl*, etc.), but it's a good idea even in private headers, in case someone includes that header first somewhere. In particular, all platformsupport API is private. Change-Id: If287baa5d9ed14e93c1666efa0e6332c4c1cd9a4 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Hide Harfbuzz from the outer worldKonstantin Ritt2013-03-131-2/+0
| | | | | | | | Don't export, don't generate private headers, don't mention HB in API. Change-Id: I048ebd178bf4afaf9fda710a00933b95274cf910 Reviewed-by: Josh Faust <jfaust@suitabletech.com> Reviewed-by: Lars Knoll <lars.knoll@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-042-4/+2
| | | | | | | | 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>
* iOS: Add required public dependencies of the CoreText font databaseTor Arne Vestbø2013-02-271-0/+8
| | | | | | | | | | | | | CoreText and CoreGraphics are available on iOS as stand-alone frameworks, but on Mac OS X they are part of the ApplicationServices umbrella framework. Mac OS 10.8 actually introduced both as stand-alone frameworks, but for simplicity we link to ApplicationServices, as there's still symlinks from ApplicationServices to the real frameworks. Change-Id: I7f7ef795629cc37da85857d5c42283754acc4474 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* iOS: Move Q_OS_IOS out of makesespec to qsystemdetection.hTor Arne Vestbø2013-02-261-0/+2
| | | | | | | | | We treat iOS as a variant of Mac OS, so for iOS both Q_OS_MAC and Q_OS_IOS will be defined. This matches what Apple assumes in the header file TargetConditionals.h Change-Id: I55cc851401b748297478e4c32e84e0f6e1fdfc28 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Reintroduce use of CTFontCopyDefaultCascadeListForLanguages on Mac OSTor Arne Vestbø2013-02-211-2/+2
| | | | | | | | | | | Now that we always build against an SDK, we can be sure that the function declaration for CTFontCopyDefaultCascadeListForLanguages is available in the CoreText CTFont.h header. Change-Id: I304a701548833e5c7774b4fd2e72eb8c541dd103 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Introduce macros for simplifying platform checks on Mac OS and iOSTor Arne Vestbø2013-02-181-2/+2
| | | | | Change-Id: Ibab8486e1e6d7e4d8922fce96add055e60c6095c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove ifdefs for supporting Mac OS <= 10.5Tor Arne Vestbø2013-02-182-9/+0
| | | | | | | | Qt5 requires Mac OS 10.6, so we can remove checks such as if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 Change-Id: Iea21727a277291148704ecf9677ed0b68c24920f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Manually add Emoji font to fallback list on Mac OSTor Arne Vestbø2013-02-161-0/+6
| | | | | | | It's not part of the fallback list we read from the plist file. Change-Id: Ieaf306d4cd51a6bb6e6f41048876d3e674a4b99b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Don't assume CTFontCopyDefaultCascadeListForLanguages is available on 10.8Tor Arne Vestbø2013-02-141-3/+2
| | | | | | | | | | | | | | | It's listed in the 10.8 SDK as CT_AVAILABLE_STARTING( __MAC_10_8, __IPHONE_6_0), but not in the release notes for 10.8: http://developer.apple.com/library/mac/#releasenotes/General/APIDiffsMacOSX10_8/CoreText.html The iPhoneOS 6.0 SDK lists it as CT_AVAILABLE_STARTING( __MAC_NA, __IPHONE_6_0), which matches the release notes, and some 10.8 systems in the wild apparently do not have this function declaration in the system headers, so for now we'll be conservative and not assume it's available. Change-Id: Idbadda58ea95bfca75458d77cb2799c49fba013a Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Add support for color glyphs (Emoji) on Mac OS X and iOSTor Arne Vestbø2013-02-132-22/+44
| | | | | | | | | | | | | A new glyph type is added to the glyph caches for ARGB bitmap glyphs, and the raster and OpenGL paint engines have been modified to support this glyph type for drawCachedGlyphs(). The CoreText font engine implements support for these glyphs through the CTFontDrawGlyphs API, since CGContextShowGlyphsWithAdvances does not handle color glyphs. Change-Id: Idad9ce75a911cae130d65aebe59142772a16fc12 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>