summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine_coretext.mm
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headersAkseli Salovaara2015-03-311-13/+13
| | | | | | | | | 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. Change-Id: I7e3e96183e073877b46bc8071b2ccae19e69426b Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Fix bugs generating PDF on CocoaJames Turner2015-01-291-3/+65
| | | | | | | | | | Provide real implementations of: properties(), faceId() and getUnscaledGlyph Task-number: QTBUG-10094 Change-Id: Ib84a7a5c9e29e4d634b47bc2856787b2482048da (cherry picked from qtbase/517fb9026896f7ac20376f253babae5a7c57721d) Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
* Updated year in copyright headerKai Koehne2014-03-261-1/+1
| | | | | | | | | | | | | | | | | | find . -path '*/3rdparty/*' -prune -o -type f -print | xargs -L1 sed -i -E 's/Copyright(.*) 2013 Digia/Copyright\1 2014 Digia/g' Manually patched files: demos/spectrum/3rdparty/fftreal/fftreal_wrapper.h demos/spectrum/3rdparty/fftreal/fftreal_wrapper.cpp src/3rdparty/s60/eiksoftkeyimage.h tools/qdoc3/test/qt-project.qdocconf tests/auto/qsharedpointer/nontracked.h tests/auto/qsharedpointer/nontracked.cpp Change-Id: I3f9074923b4d6bd4666258ab04f01476cc6e901c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. 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: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix stretched font positions in LionJiang Jiang2011-12-011-2/+8
| | | | | | | | | | In Mac OS X 10.7 and up, According to http://lists.apple.com/archives/Coretext-dev/2011/Nov/msg00006.html we need to manually apply transform matrix to advances if text matrix as been applied, CTRunGetPositions won't apply it. Task-number: QTBUG-22825 Reviewed-by: Eskil
* Use CoreText for font rendering on uikit.Eike Ziller2011-08-241-4/+8
|
* Use truncate only for subpixel boundingBox x positionJiang Jiang2011-07-081-1/+1
| | | | | | | | | | | | | | Since Lion, Core Text starts to return fractional values for x origin in the glyph bounding box. To get correct alignment we need to make it integer, it seems that round will cut certain pixels (x = 0.6 will be round to 1, then that glyph will be moved too much to the left in image glyph cache). Reverting 4297b85a appears to work fine on previous version of Mac OS X as well. This change will not affect Windows (DirectWrite) and FreeType font engines since they both return integer values for that. Reviewed-by: Eskil
* Revert 344a4dcfe and part of 93bce787Jiang Jiang2011-07-071-3/+4
| | | | | | Due to subpixel grid change, these changes are no longer needed. Reviewed-by: Eskil
* Fix raster subpixel positioning in LionJiang Jiang2011-07-071-1/+1
| | | | | | | | In Lion, the x position returned by CTFontGetBoundingRectsForGlyphs can be fractional, we need to round().truncate() it as we did in QTextureGlyphCache to save the baseLineX. Reviewed-by: Eskil
* Remove some metrics parsing code from Core TextJiang Jiang2011-07-061-17/+3
| | | | | | | | | | | | The respective value in some of the default fonts like Lucida Grande are simply not reliable. It seems that the only reliable way to get such information is by going through all the glyphs. It seems that these code are not well tested on Mac and should be removed for now since it caused visible regressions in QLineEdit rendering. Reviewed-by: Eskil
* Allow selecting fonts with irregular style namesJiang Jiang2011-06-101-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fonts like "Helvetica Neue UltraLight" or "Skia Regular Black Condensed" can't be selected in Qt because either they don't report correct numeric values for weight/stretch/etc. or these values are not mapped from QFont enums in a linear way. Thus we provide a shortcut to select these fonts with PostScript name or full name without resorting to family name matching in QFontDatabase (these fonts are not registered in font database anyway). After this, we can simply use: QFont font("Helvetica Neue"); font.setStyleName("UltraLight"); to select these fonts. QCoreTextFontEngineMulti matched like this can be created directly from the CTFontRef instance instead of creating from the font name, making this process faster. The commit also cleaned up the font loading process in Mac font database a bit, moving the code for family matching into a separate function. Add QFontInfo::styleName() and QRawFont::styleName() to access the resolved style name for a font. Task-number: QTBUG-19366 Change-Id: Iad07768c02ed06cc8d6b7395dec554384f410506 Reviewed-on: http://codereview.qt.nokia.com/333 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> (cherry picked from commit 97391be5ebddc62545ddb88f92fc2045bfa10711)
* Merge remote branch 'qt/4.8' into fire-masterPaul Olav Tvete2011-06-061-17/+17
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/wayland/qwaylandclipboard.cpp src/plugins/platforms/wayland/qwaylandclipboard.h src/plugins/platforms/wayland/qwaylanddisplay.cpp src/s60installs/eabi/QtOpenGLu.def
| * Merge remote-tracking branch 'qt/4.8'Jyri Tahtela2011-05-181-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/examples/wheel.qdoc src/gui/util/qflickgesture.cpp src/gui/util/qflickgesture_p.h src/gui/util/qscroller.cpp src/gui/util/qscroller.h src/gui/util/qscroller_p.h src/gui/util/qscrollerproperties.cpp src/gui/util/qscrollerproperties.h tests/auto/qscroller/tst_qscroller.cpp
| * | Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | | | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | | Correct antialias disabling logic for Core TextJiang Jiang2011-06-041-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should always turn antialias off when QFont::NoAntialias being passed in styleStrategy. That corrects some QStaticText tests. Change-Id: Iaffc5f3bb7f501dcb648cab41a8b6ffcf93f90ae Reviewed-on: http://codereview.qt.nokia.com/328 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> (cherry picked from commit c25495dba7eff32b66119737552905787e97e665)
* | | Keep line consistency with text baselineJiang Jiang2011-05-301-4/+4
| | | | | | | | | | | | | | | | | | Also revert previous underline patch. Reviewed-by: Eskil
* | | Workaround a bug in Core Text to select Light fontsJiang Jiang2011-05-161-1/+6
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently in Core Text there is not proper way to select fonts with Light weight, for example: QFont font("Helvetica"); font.setWeight(QFont::Light); will give you Helvetica-Light, as with: QFont font("Helvetica"); font.setWeight(QFont::Normal); because of a bug in Core Text, applying 0 symbolic traits with CTFontCreateCopyWithSymbolicTraits will always return the Light variant of that font family. Thus, we should only do this unless symbolicTraits is not 0 or font.weight is not Normal (Light is not a symbolic trait, but CT doesn't support selecting Light weight numerically). Reviewed-by: Eskil
* | Fix QRawFont::setPixelSize() on MacEskil Abrahamsen Blomfeldt2011-05-061-1/+1
|/ | | | | | | | When refactoring the setPixelSize() code of QRawFont, it was broken on Mac. To avoid making the same mistake again, I've added a simple autotest to check that the pixel size is actually set. Reviewed-by: Jiang Jiang
* Make QtQuick2 compile on QPAEskil Abrahamsen Blomfeldt2011-04-271-0/+9
| | | | | | | | | | | Moved the logic to set pixel size into the font engines to avoid making the platform plugin interface too complex, and added a function in QPA to make an isolated font engine based on font data. Currently none of the QPA back-ends supports it, but it compiles and spits out a warning if you try to create a QRawFont from data there. This isn't used in QtQuick2 anyway. Reviewed-by: Jiang Jiang
* Use maximum ascent/descent/leading from fallback fonts in shapingJiang Jiang2011-04-271-3/+10
| | | | | | | | | | | | | | | When shaping a QScriptItem with a multi font engine, currently we only take the ascent/descent/leading from the primary (first) font engine in that multi font engine, however, subsequent engines used during shaping may have larger ascent/descent/leading, disregarding them may cause clipping issues in some cases. It's fixed by checking each font engine used in the shaping process and take the maximum value instead of the first one. On ATSUI we merely make it compile. Task-number: QTBUG-16719 Reviewed-by: Eskil
* Another ugly hack to make bidi cursor work with Core TextJiang Jiang2011-04-271-3/+24
| | | | | | | | | | | If the text is wrapped with LRE/LRO/RLE/RLO override/embed marks, Core Text in Mac OS X 10.5 doesn't produce an empty glyph at the beginning of the glyphs (while it does in Mac OS X 10.6), thus we need to prepend an empty glyph here, otherwise cursor position calculation will consider the first two characters as a ligature of the same glyph. Reviewed-by: Eskil
* Long live QRawFont!Eskil Abrahamsen Blomfeldt2011-04-151-110/+206
| | | | | | | | | | | | | | The QGlyphs API was initially attempted with a bastardization of QFont which was meant to encapsulate a single, physical font instance (a QFontEngine) where a set of glyph indexes would make sense. This is not how QFont was intended to be used, and it caused several issues. At the same time, the requirement for loading a font from ttf/otf data and be able to access it and use it without polluting the rest of the process with the font arose. To support these two APIs we introduce QRawFont, which is an abstraction on top of a single physical font. Done-with: Jiang Jiang
* Only enable RightToLeft forcing in OS X 10.6 and skip the testJiang Jiang2011-03-161-0/+2
| | | | Reviewed-by: Eskil
* Merge remote branch 'qt-mainline/master'aavit2011-03-151-1/+1
|\
| * Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-03-141-1/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Fix static text item positioning GL2 paint engine Fix combining marks handling in Core Text shaper Fix PBuffer example to work again
| * | Update copyright year to 2011.Rohan McGovern2011-03-111-1/+1
| | | | | | | | | | | | | | | Reviewed-by: Trust Me (cherry picked from commit 774a3536b00c4d6e4c4c10b708e31b4373a338e3)
* | | Add RightToLeft direction forcing to Core Text shaperJiang Jiang2011-03-141-2/+13
| |/ |/| | | | | | | | | So that setting Qt::TextForceRightToLeft flag on QTextLayout can work. Reviewed-by: Eskil
* | Fix combining marks handling in Core Text shaperJiang Jiang2011-03-111-1/+2
|/ | | | | | | | | | | For fonts without combined glyph for combinations like U+0062 U+0300, Core Text will return glyph sequences like <b> <`>, the latter will have advance_x = 0, advance_y = <positive value> to keep it above the previous glyph. To get correct positioning in flipped coordinate, we need to store the negative y advance in Qt. Task-number: QTBUG-15675 Reviewed-by: Eskil
* Fix boundingBox for raster engine with synthesized italic fontsJiang Jiang2010-12-091-5/+8
| | | | | | | | We need to account for the extra right side bearing caused by text transform for synthesized italic. Task-number: QTBUG-14803 Reviewed-by: Eskil
* Restore patch that got lost in mergeJørgen Lind2010-12-021-2/+65
| | | | | | | | | | | | | | | The merge was: e50e811461b54e07184af547f62aa44b3c5bb681 The parts of these commits was lost in the manual merge: 46d2d05e3a95eefae1c72f55d57cbea4ce27d14e 8e8bae1f4faf676b6104bbf9039ad10f139fa7e8 344a4dcfe847dd778c33d1a852381672dd331409 e45c4387ae16627d61e30a58ae901d888d375aa7 And I also added a license header to qfontengine_coretext.mm Reviewed-by: paul
* Restore patch that disappeared in mergeJørgen Lind2010-12-011-2/+2
| | | | e50e811461b54e07184af547f62aa44b3c5bb681
* Moving QCoreTextFontEngine with related classes into own fileJørgen Lind2010-10-281-0/+667
The declaration of QCoreTextFontEngine was ifdefed in qfontengine_p.h. So was QMacFontEngine. I have moved them into their own files (qfontengine_coretext_p.h and qfontengine_mac_p.h).