summaryrefslogtreecommitdiffstats
path: root/src/gui/text
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/4.8' into qt-4.8-from-4.7Liang Qi2011-08-0310-18/+45
|\
| * Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-08-0110-18/+45
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Make macdeployqt more robust against usage of symbolic links. Document support for Linguist on Mac. Make mac(deploy|change)qt handle dylibs that use Qt inside an app bundle. Guard macdeployqt against @rpath and @loader_path too. Fix typo. OpenVG cleanup. Include trailing space width in RTL text line width Fix the compilation error when QT_NO_PLUGIN_CHECK was set. Fixed holes in border image drawing by introducing new API. Properly resolve and use glMapBuffer / glUnmapBuffer on GLES2. Revert "fix QFileInfo::isSymLink() for NTFS mount points" Remove debug output. Add some sound support to the uikit platform. Add flickrdemo uikit example project. Fix uikit simulator build. Get subpixel antialiasing again w/combo of raster and affine transform Add initial support for bitmap version 4/5 headers. optimize QRawFont::supportsCharacter() Switch to use floating point pixelSize in QRawFont completely Add a way to check if we have a matching family in the database.
| | * Include trailing space width in RTL text line widthJiang Jiang2011-07-261-1/+5
| | | | | | | | | | | | | | | Task-number: QTBUG-15511 Reviewed-by: Eskil
| | * optimize QRawFont::supportsCharacter()Ritt Konstantin2011-07-222-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | a single UCS-4-encoded codepoint could morph into 1 or 2 UCS-2-encoded codepoints only; thus, allocating QString just to parse it could be avoided and the well-defined UCS-4 to UCS-2 arithmetic could be used instead Merge-request: 1305 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
| | * Merge remote branch 'mainline/4.8'Jiang Jiang2011-07-226-5/+21
| | |\
| | * | Switch to use floating point pixelSize in QRawFont completelyJiang Jiang2011-07-217-13/+13
| | | | | | | | | | | | | | | | Reviewed-by: Eskil
| | * | Add a way to check if we have a matching family in the database.Pierre Rossi2011-07-212-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed in order to get proper font fallback, and incidentally webfonts, working in QtWebKit. See: https://bugs.webkit.org/show_bug.cgi?id=55036 Internal for now, maybe it could be made public for a future release. Task-number: QTBUG-15575 Change-Id: I5c454689125cd9d5fda26ff2149208ed1beec24d Reviewed-on: http://codereview.qt.nokia.com/1829 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* | | | Merge branch 4.7 into qt-4.8-from-4.7Qt Continuous Integration System2011-08-021-21/+2
|\ \ \ \ | |/ / / |/| | |
| * | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2011-08-021-21/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Detect linked fonts by name (insead of via CLinkedTypeface* Api)
| | * | | Detect linked fonts by name (insead of via CLinkedTypeface* Api)Alessandro Portale2011-08-021-21/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The detection of Linked Fonts via CLinkedTypeface* Api does not work in all cases. It works in QML apps, but not in QWidgets based apps. The reason is still unclear. This commit replaces the CLinkedTypeface* Api based code of commit fa344b355d311fce7954e2fd1a22a87a88194783 whith a simple type face anme analysis. Assumption is that the names of Linked Fonts always end with "LF" and are all upper case. This patch has been tested by more people than just me, but it is too dirty to mention the others as reviewer. I take the shame and blame. Task-Number: QTBUG-20007
* | | | | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-07-294-27/+84
|\ \ \ \ \ | |/ / / / | | | | / | |_|_|/ |/| | | | | | | Conflicts: src/gui/kernel/qcocoasharedwindowmethods_mac_p.h src/gui/text/qfont_s60.cpp
| * | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2011-07-281-12/+6
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Revert binary search in QTextEngine::findItem
| | * | | Revert binary search in QTextEngine::findItemJiang Jiang2011-07-281-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's part of c9607f069f0fb98021daf0af9f1d1b2981018e0c which caused crash in certain cases. Task-number: QTBUG-17209 Reviewed-by: Gunnar Sletta
| * | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2011-07-271-4/+15
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Save previous font engine for right bearing adjustment Fix compilation under OSX 10.7 or using llvm-gcc. Fix typo in QFontDialog docs Reset previousGlyph once we reached a new text item
| | * | | Save previous font engine for right bearing adjustmentJiang Jiang2011-07-271-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In last fix I forgot that fd818312 was for saving and restoring the right bearing (of last visible glyph) when a LineSeparator was hit (which can have a different font engine but usually not visble), thus we can't reset previousGlyph in that case. To make sure we still get correct right bearing from the font engine used to shape previousGlyph, we need to save that font engine as well. It does make the code more complicated than simply saving the right bearing when a QScriptItem boundary is hit, so hopefully it's an optimization worth to be made (following e1915815). Task-number: QTBUG-20423 Reviewed-by: Eskil
| | * | | Reset previousGlyph once we reached a new text itemJiang Jiang2011-07-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug was introduced in fd818312. Before that, previousGlyph is only saved in the same text item. After we moved it to LineBreakHelper struct, it will cause crash if the font engine in the new text item no longer contains the sub engine required by previousGlyph. Task-number: QTBUG-20243 Reviewed-by: Eskil
| * | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2011-07-272-9/+62
| |\ \ \ \ | | |/ / / | |/| / / | | |/ / | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Symbian^3 workaround: Avoid usage of linked fonts.
| | * | Symbian^3 workaround: Avoid usage of linked fonts.Alessandro Portale2011-07-272-9/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Linked Fonts" are a new feature in Symbian^3, first used in SR11.1. This patch prevents Qt from using linked fonts in any way. Avkon based applications benefit from Linked Fonts because they can now transparently render multi-script text, e.g. Latin/Chinese/Japanese (Qt does that by its own and calls the feature 'font merging'). From Qt's poing of view, Linked Fonts are a severe regression in Symbian's API. 1 Font table Api for linked fonts is extremely slow 2 'cmap' tables do not seem to reflect the "linkage", causing garbled text or crashes. 3 Linked fonts appear with cryptic type face names, and are redundant since they are just compounds of the other, real fonts. This patch adds a detection of Linked Fonts using CLinkedTypefaceSpecification and prevents their inclusion into QFontDataBase. Furthermore, it detects if the Symbian System font is a Linked font and if needed tries to fall back to a classical Symbian system font, e.g. "Nokia Sans S60" or "Series 60 Sans". Fallback to "Pure" will need to be added, later on. Task-Number: QTBUG-20007 Co-authored-by: Miklos Vlasa Reviewed-by: mread <qt-info@nokia.com>
* | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-07-212-2/+9
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Move separator skipping to proper place Skip shaping for hidden line/paragraph separators Support interface orientation for uikit. Add support for opening LinuxInput devices exclusively ('grabbing'). Fixed regression in compilerwarnings. Properly quit the input event thread in the directfb platform plugin. Apply 57993ba7 properly to 4.8 Deprecate some QPixmap functions (marked as obsolete already). Deprecate some functions in QImage (that have been obsolete since 4.1). Add QLocale::toUpper/Lower Fix warning for uninitialized variable
| * | | Move separator skipping to proper placeJiang Jiang2011-07-192-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | So that it won't crash some places that requires shaping results. Reviewed-by: TrustMe
| * | | Skip shaping for hidden line/paragraph separatorsJiang Jiang2011-07-191-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we are not going to draw them in QTextLine::draw either, and shaping them here will cause performance issue on certain systems like Mac OS X 10.7 (most fonts don't have glyph for U+2028, while font fallback handling in Core Text slowed down a bit). Task-number: QTBUG-20252 Reviewed-by: Eskil
| * | | Apply 57993ba7 properly to 4.8Jiang Jiang2011-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we have moved alignLine from qtextlayout.cpp to QTextEngine, this patch has to be applied manually. Reviewed-by: TrustMe
| * | | Fix warning for uninitialized variableJiang Jiang2011-07-121-1/+1
| | | | | | | | | | | | | | | | Reviewed-by: Eskil
* | | | namespace fixJoerg Bornemann2011-07-141-1/+2
| | | | | | | | | | | | | | | | Reviewed-by: hjk
* | | | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-07-141-0/+1
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | Conflicts: src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def
| * | | Fix potential crash when clicking in a text editEskil Abrahamsen Blomfeldt2011-07-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the attributes() call might resize the layout and therefore delete the previous data, the logClusters pointer might be dangling at this point. We need to reget it to make sure it's valid. Task-number: QTBUG-20310 Reviewed-by: Jiang Jiang
| * | | Check engine existence before increasing reference countJiang Jiang2011-07-121-3/+6
| | | | | | | | | | | | | | | | | | | | Reviewed-by: TrustMe (cherry picked from commit 244620438700464a862ceab7c881974a5b1d1fea)
| * | | Keep reference count for cached font engines in QTextEngineJiang Jiang2011-07-111-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So that if these font engines are deallocated elsewhere (by QFontCache for instance), we can still access them in QTextEngine. Task-number: QTBUG-17603 Reviewed-by: Eskil (cherry picked from commit 6e23fb69e441871829765ff512e90fed17b6798d)
| * | | Optimize text layout.Michael Brasser2011-07-113-25/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When laying out text, a significant amount of time was being spent querying for the font engine. This patch: * changes the layout to only query for the engine when a new script item is encountered. * adds an internal cache of the previous result to QTextEngine::fontEngine(). This catches the important case of multiline text with few font engine changes. With these changes layout costs are now approximately 60% of what they were previously, as measured by the text layout benchmarks. Reviewed-by: Eskil Abrahamsen Blomfeldt (cherry picked from commit 0c56bef89b6e3fe4c9fb32eb8b51a6ea316a89fa)
| * | | Fix crash when app font is addedJiang Jiang2011-07-113-19/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Loading app fonts will clear the application font cache, but QFontPrivate::engineWithScript will try to load the font again, in Mac the font engine used here must be the one used for shaping, because subsequent sub font engines may be added to it during the shaping process (QCoreTextFontEngineMulti::stringToCMap). That is why we need to fetch the font engine directly from QTextEngine's fontEngine cache instead of QFontCache. Task-number: QTBUG-20250 Reviewed-by: Eskil (cherry picked from commit 1f90ae36cff8acf581d1624bf011fe3a55c623c0)
| * | | Fix horizontal center alignment with trailing spaceJiang Jiang2011-07-041-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Text drawn with horizontal center alignment (AlignHCenter) and QTextOption::IncludeTrailingSpaces flag as off should consider the trailing space width (leading space width for RTL lines), because textAdvance here ignores the space. Disregard that space width here in alignLine will make RTL lines aligned a bit to the right. In short, for something like this: |w1|space|text|w2| |<- totalWidth ->| we want to have w1 + spaceWidth = w2 = (totalWidth - textWidth)/2, so that the actual rendered text will appear at the center of the bounding rect. Task-number: QTBUG-18303 Reviewed-by: Eskil
* | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-07-125-23/+33
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Fix compiler warning in qtextdocument.cpp Fix crash when app font is added Use truncate only for subpixel boundingBox x position Use more numerically robust algorithm to compute QBezier::pointAt(). Fix editable combobox style on Mac Revert 344a4dcfe and part of 93bce787 Fix raster subpixel positioning in Lion
| * | Fix compiler warning in qtextdocument.cppEskil Abrahamsen Blomfeldt2011-07-111-1/+1
| | | | | | | | | | | | | | | | | | Missing QLatin1String() wrapper to ensure codec of text. Reviewed-by: Jiang Jiang
| * | Fix crash when app font is addedJiang Jiang2011-07-113-19/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Loading app fonts will clear the application font cache, but QFontPrivate::engineWithScript will try to load the font again, in Mac the font engine used here must be the one used for shaping, because subsequent sub font engines may be added to it during the shaping process (QCoreTextFontEngineMulti::stringToCMap). That is why we need to fetch the font engine directly from QTextEngine's fontEngine cache instead of QFontCache. Task-number: QTBUG-20250 Reviewed-by: Eskil
| * | 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
| * | Merge remote branch 'mainline/4.8'Jiang Jiang2011-07-073-165/+73
| |\ \ | | | | | | | | | | | | | | | | Conflicts: dist/changes-4.8.0
* | \ \ Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-doc-staging into ↵Qt Continuous Integration System2011-07-084-4/+18
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-doc-staging: Applied fix (dea9ca8b7a4166e1c3d3fc374621ad02c1220d3a)from qt5/qtbase. Committing the qt-webpages.qdoc file with the online links Preparing documentation package for 4.8-beta Doc: Clarified the range of return values from QLineF::angle(). Doc: Fixed \since declarations. (cherry picked from commit 358e018dbb4b4dbdbfc702a6d462f113a1357e1e) Doc: Standardized on QtQuick for \since declarations. (cherry picked from commit 609dc22f719ecb8d48349fd56f84960bbf46d731) Doc: Removed whitespace. (cherry picked from commit 01b3f508d1f7e9951baf60f487feadfa98ba4751) Modified \since command behavior slightly to handle project and version. Doc: Added a simple introduction to Qt and fixed links. (cherry picked from commit 9ed61311bce15b8f1bb4b30ee9133f1a2355f41d) Doc: Added more appropriate links to help reduce confusion. Doc: Removed non-ASCII characters from the documentation. (cherry picked from commit 1bd6f1bd280ee6e1ecd4de2291c8ccfb4d06b7a4) Doc: Updated documentation with \since 4.8 declarations.
| * \ \ \ Merge remote branch 'upstream/4.8'Jerome Pasion2011-07-083-165/+73
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | Conflicts: doc/src/external-resources.qdoc
| * | | | Doc: Updated documentation with \since 4.8 declarations.David Boddie2011-06-304-4/+18
| | | | |
* | | | | Merge remote branch 'mainline/4.8' into stagingJiang Jiang2011-07-083-165/+73
|\ \ \ \ \ | | |/ / / | |/| / / | |_|/ / |/| | | Conflicts: dist/changes-4.8.0
| * | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-07-022-162/+66
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: changelog Compile with DEBUG_FONTENGINE define minor optimization remove the old compatibility code make QFontEngineQPF1 work even without mmap(2) support Doc: Fixing typo
| | * | | Compile with DEBUG_FONTENGINE defineHarald Fernengel2011-07-011-4/+4
| | | | | | | | | | | | | | | | | | | | Trivial fix to make the debug code compile again after latest changes
| | * | | minor optimizationRitt Konstantin2011-07-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use the cached data from fileinfo rather than re-creating it one line later Merge-request: 1260 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
| | * | | remove the old compatibility codeRitt Konstantin2011-07-011-95/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | obsoleted by the last commit (and moreover, disabled a while ago) Merge-request: 1260 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
| | * | | make QFontEngineQPF1 work even without mmap(2) supportRitt Konstantin2011-07-011-62/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this also fixes a memory leaking on Integrity (an allocated data was unmap()'ed rather than free()'d) Merge-request: 1260 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
| * | | | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-07-011-3/+7
| |\ \ \ \ | | |_|/ / | |/| | / | | | |/ | | |/| Conflicts: src/s60installs/s60installs.pro
| | * | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2011-06-291-3/+7
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix text color in some cases of QML and QStaticText
| | | * | Fix text color in some cases of QML and QStaticTextEskil Abrahamsen Blomfeldt2011-06-291-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts 518c2a58ed6fdfd7449cb4476aa8ea0d32ad16e3 which caused a regression. When writing systems are mixed and an underline is set on the font, QPainter will set a pen with the current color and a new width on itself before drawing the decoration. This would cause the recorder in QStaticText to mark the pen as dirty, saving the current pen color in all subsequent text items. The effect was e.g. that in QML the cached color would override the current one, making it impossible to change the color on the text without forcing a relayout somehow. The right fix is to only mark the pen as dirty when its color actually changes. Task-number: QTBUG-20159 Reviewed-by: Jiang Jiang