summaryrefslogtreecommitdiffstats
path: root/src/gui/text
Commit message (Collapse)AuthorAgeFilesLines
* Change to release licenses for 4.6.3.Jason McDonald2010-05-3093-1209/+1209
| | | | Reviewed-by: Trust Me
* Fix regression with Qt::AlignRight on monospaced text in QTextLayoutEskil Abrahamsen Blomfeldt2010-05-271-2/+2
| | | | | | | | | | | For monospaced fonts, using the width (including the bearing) of the text to align it to the right hand side, will break alignment of columns of characters. To fix the problem, we go back to the old procedure, by using the advance of the text as basis of alignment instead. Done-by: thorbjorn Reviewed-by: Eskil
* Back port change d85b149a5c7f3532f8e1a593a79298c9ae38a95fEskil Abrahamsen Blomfeldt2010-05-272-0/+2
| | | | | | | | | Fixes right alignment of monospaced text, which was a regression in Qt 4.6.0. Initially it was fixed in Qt 4.7 only, but the regression was later deemed severe enough to fix in 4.6.x as well. Task-number: QTBUG-8864 Reviewed-by: thorbjorn
* Support linked fonts (.ltt) from standard font locations.Alessandro Portale2010-05-141-0/+1
| | | | | | | | | | | | | | | The internal font database was only populated with .ttf and .ccc files. This patch adds .ltt as file type. Without complete font type coverage in the fontstore, we may get a mismatch in the internal association of font table and fontfamily. Most probably, this will also fix the crash on SSE Satio's. SSE seems to use .ltt files already on S60 5.0. An improvement needs to be verified by an owner of such a device, however. Task-number: QTBUG-8905 Reviewed-by: Aleksandar Sasha Babic
* Fixed QFont to respect the italics constructor flag.Trond Kjernåsen2010-05-121-0/+3
| | | | | | | | | Creating a QFont with the constructor that takes the italic bool flag didn't work properly, since the property wasn't set to be resolved. It may be that the property should *always* be resolved, but to minimize impact, it's only done now if you pass in 'true' for italics. Reviewed-by: Eskil
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-05-011-17/+40
|\ | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fix bold text rendering of Thai and Vietnamese on Symbian
| * Fix bold text rendering of Thai and Vietnamese on SymbianAlessandro Portale2010-04-301-17/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Symbian Qt font database made the wrong assumption that a font face name maps one to one to a font. That led to a mismaptch between actual font face variants (bold) versus the retrieved font tables. S60, usually comes with two 'Series 60 Sans' font files where one is semi bold. The rasterizer plugin merges both fonts to one and returns the semi bold font if a bold font is requested, otherwise it returns the normal font. Both font files have slight differences in the cmap. Qt's font implementation always retrieved the font tables for the normal font even if it drew the bold font. That led to wrong glyphs in some languages (Thai, Vietnamese), thanks to the cmap differences. This fix makes sure that when retrieving the font tables, bold and italic are considered. It avoids innecessary double allocations of MOpenFontTrueTypeExtension instances. Also the ChunkHeap size of m_heap does now depend on the number of loaded font files. Task-number: QTBUG-6812 Reviewed-by: Aleksandar Sasha Babic
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-04-301-6/+3
|\ \ | |/ |/| | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fixed a leak in QTextDocument::print(). Ensured that WA_InputMethodEnabled was set before FocusInEvent was sent.
| * Fixed a leak in QTextDocument::print().Trond Kjernåsen2010-04-291-6/+3
| | | | | | | | | | | | | | Also fixed a typo in the QScopedPointer docs. Task-number: QTBUG-10301 Reviewed-by: Kim
* | Removing unused code.Alessandro Portale2010-04-302-27/+2
|/ | | | | | | MOpenFontShapingExtension was not used. Cleaning up and reducing delta between branches Reviewed-by: Aleksandar Sasha Babic
* Renaming a few unexported, private symbolsAlessandro Portale2010-04-284-46/+46
| | | | | | | | That reduces the delta between 4.6/4.7 and a patch that I am pre- paring for Symbian^4. The renaming will help me a lot when main- taining font issues on 4.6 and 4.7 and different Symbian versions. Reviewed-by: trustme
* Fixed a QFontEngine leak for QFont objects used in threads.Trond Kjernåsen2010-04-271-3/+2
| | | | | | | | | Only the QFontCache object for the main thread was cleared when the the application exited, or a thread was destroyed. This caused font engine references to hang around and never get deleted. Task-number: QTBUG-3976 Reviewed-by: Brad
* Removed inneccessary QGlyphLayout::offsets initialization.Alessandro Portale2010-04-211-2/+2
| | | | Reviewed-by: lars
* Fix mirrored characters for RTL text in SymbianAlessandro Portale2010-04-211-1/+3
| | | | | | | | | | | For RTL text rendering (Arabic, Hebrew), we need certain characters to be mirrored, such as brackets. This patch fixes QFontEngineS60::stringToCMap to use QChar::mirroredChar for RTL text. Task-number: QT-3299 Reviewed-by: lars
* Symbol visibility fixes for RVCT4 on SymbianIain2010-04-156-7/+7
| | | | | | | | | | | | | RVCT 4 is far more strict with regards to symbol visiblity that RVCT 2.2, and will hide symbols unless all references have default visibility in the object files. Update the various places in Qt code where the symbol visibility was set incorrectly for DLL-based platforms (those that use __declspec(dllimport) and (dllexport). Note: QtWebkit and QtScript are fixed in different commits. Task-number: QTBUG-9903 Reviewed-by: Jason Barron
* CSS: fixes border only affecting the first widget.Olivier Goffart2010-04-121-1/+1
| | | | | | | | | | | | | | Rules like "Foo { border: 2px solid; }" does not specify the border color. When the border color is not specified, it is assumed to be black. When reading the brush value from the cache, we should take that into account. Note that this logic cannot be moved into brushFromData() as it is different for the background. (when no color is specified, it is assumed to be transparent) Reviewed-by: jbache Task-number: QTBUG-9674 (part one)
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-04-121-2/+4
|\ | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix crash with QTextEdit::textChanged() when deleting a character
| * Fix crash with QTextEdit::textChanged() when deleting a characterEskil Abrahamsen Blomfeldt2010-04-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | QTextEdit::textChanged() will be emitted from a function called from within QTextCursorPrivate. If the code connected to textChanged() makes a local copy of the current text cursor and then causes it to detach, we will crash when returning to QTextCursorPrivate and trying to access the now-deleted data. To avoid this, we make a local reference to the current text cursor that gives us a guarantee that it will be valid throughout the delete-call. Task-number: QTBUG-9599 Reviewed-by: Gunnar
* | Clear QFontCache TLS content before nullifying TLS pointer.Janne Koskinen2010-04-081-1/+3
|/ | | | | | | | If not cleared server handles are left open causing Font Server to Panic with KErrInUse in Symbian. Task-number: QTBUG-9565 Reviewed-by: Simon Hausmann
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-04-061-1/+1
|\ | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix crash for multiscript text in QTextEngine::boundingBox()
| * Fix crash for multiscript text in QTextEngine::boundingBox()Eskil Abrahamsen Blomfeldt2010-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The logClusters pointer is already adjusted for the item, so it should be indexed relative to the item, hence from 0 to itemLength-1. Adding pos to the index would give us a random value for all script items > 0. Thus this would sometimes crash for text that spanned several scripts, since we would sometimes get a value back which was outside the bounds of the glyph array. Task-number: QTBUG-9374 Reviewed-by: Samuel
* | Implementing QFontEngineS60::getSfntTableData()Alessandro Portale2010-04-052-0/+32
|/ | | | | | | | | | | | | That function was not yet implementing. Its absense caused some Harfbuzz based shaping not to happen. See Robert DeWolf's comment on task QTBUG-5857 Since QFontEngineS60 is private implementation and generally not exported, no symbols need to be added to the .def files for this patch. Task-number: QTBUG-5857 Reviewed-by: trustme
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6Eskil Abrahamsen Blomfeldt2010-03-302-0/+10
|\
| * Adding QFontDatabase::removeAllApplicationFonts()Alessandro Portale2010-03-291-0/+5
| | | | | | | | | | | | | | | | It was missing and not covered by the standard autotests, so its missing was not detected for quite some time. Task-number: QTBUG-8423 Reviewed-By: Shane Kearns
| * Compile with MSVC 2005 and 2003 when no platform SDK is usedAndy Shaw2010-03-291-0/+5
| | | | | | | | Reviewed-by: Eskil
* | Compile on MingWEskil Abrahamsen Blomfeldt2010-03-302-0/+4
|/ | | | | | | MingW apparently doesn't support the GDI function GetCharABCWidthsI(), so the getGlyphBearings()-optimization is disabled for that compiler. Reviewed-by: Friedemann Kleint
* Recommit 1ebeb971d3382aec0fff927Eskil Abrahamsen Blomfeldt2010-03-226-11/+60
| | | | | | | | This reverts commit 725c2c29c192349016b1332824a7716bbb992f31 which reverted the original commit because of a test failure on qws. This recommit adds a test for whether the metrics from QFontEngine::boundingBox() are valid, which is required for the bearings to be calculated. This test was also in the original logic.
* Revert "Optimize getting bearings of a glyph on Windows for true type fonts"Olivier Goffart2010-03-196-59/+11
| | | | | | This reverts commit 1ebeb971d3382aec0fff927ce2d6ea7b0452584f. This broke tst_qlistview::wordWrap in QWS
* Optimize getting bearings of a glyph on Windows for true type fontsEskil Abrahamsen Blomfeldt2010-03-176-11/+59
| | | | | | | | | | | | Usually, the bearing of a glyph is calculated based on the bounding box of the glyph. However, retrieving these bounds is a costly operation on Windows. For true type fonts, we can retrieve the bearings directly by getting the ABC widths, so as an optimization we implement a new virtual function in QFontEngine which retrieves the bearings of the glyph. The default implementation uses boundingBox, but on Windows we try to take the shortcut. Reviewed-by: Simon Hausmann
* Optimize speed of QTextLayout and QPainter::drawTextEskil Abrahamsen Blomfeldt2010-03-171-40/+82
| | | | | | | | | | | | | | | | | | | | | | | | | QFontEngine::boundingBox() is potentially an expensive function, because the font engines have to consult the underlying font system for the values and usually do not cache the results. To account for negative right bearing in the case of text layouts, we would call the boundingBox() function at every potential break point in the text, causing a great performance hit on text drawing. To minimize the impact of this, we only calculate the right bearing when we have to: 1. If subtracting the minimum right bearing from the width would cause the line to expand beyond its maximum line width, then we have to get the actual metrics of the last glyph to check if we need to break. 2. The line's final textWidth should include the negative right bearing, so unless it has already been calculated, we calculate it when the correct line width has been found. This gives us a potentially huge speed-up, since boundingBox() will in the common case only be called once for the last glyph in each text line. Task-number: QTBUG-9074 Reviewed-by: Simon Hausmann
* Fixed filename cases to support building Qt for Symbian in LinuxMiikka Heikkinen2010-03-122-2/+2
| | | | | | | Part of QtP delta reduction effort. Task-number: QT-3055 Reviewed-by: Janne Koskinen
* Memory leak!Gabriel de Dietrich2010-03-091-1/+2
| | | | | | | Multiple insertions of the same (key, value) pair in a QMultiHash. Reviewed-by: Olivier Task-number: QTBUG-8862
* Avoid QString reallocation in QTextEngineAndreas Kling2010-03-041-4/+2
| | | | | | | | Calling QString::utf16() will cause reallocation (for null-termination) if the string was created via fromRawData(). Reviewed-by: Benjamin Poulain Reviewed-by: Simon Hausmann
* Fix Thai text on Windows 7Eskil Abrahamsen Blomfeldt2010-02-161-2/+12
| | | | | | | | | | | Segoe UI, which is the default ui font on Windows 7, contains the glyph for a single character in the thai unicode range. This is thus detected as supporting the Thai script even though it only contains this one character, and as a result all thai text would appear as boxes on Windows 7 unless you changed the font. The patch is a temporary hack to work around the problem until a proper fix can be made. Reviewed-by: Lars Knoll
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-02-101-1/+5
|\ | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Fix the WebKit build Blinking cursors are 2 pixels wide on Mac OS X/Cocoa. Fixed compilation with QT_NO_WHEELEVENT Take into account the solaris-cc-64-stlport mkspec Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( ffae5e11181a3961193fa21ea405851cad714d4b )
| * Blinking cursors are 2 pixels wide on Mac OS X/Cocoa.Prasanth Ullattil2010-02-101-1/+5
| | | | | | | | | | | | | | | | | | | | | | Blinking cursors drawn in positions other than zero, can become 2 pixel wide. This is caused by a rendering bug in the paint engine used by Cocoa. If a fillRect() is called in a nox pixel boundary this engine draws them 2 pixels wide instead of one. So make sure this is always on a pixel boundary. Task-number: QTBUG-8100 Reviewed-by: Trond
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-02-101-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: License update as requested by legal for file relicensed from S60. Make compile Removed dependency to moc.exe from Symbian builds
| * | Make compileThomas Zander2010-02-101-1/+1
| |/ | | | | | | Reviewed-By: Alessandro Portale
* | Clarify QFont::rawName() docs.Trond Kjernåsen2010-02-101-2/+3
|/ | | | | Task-number: related to QTBUG-8038 Reviewed-by: Kim
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-02-061-6/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fixed casual crash in initializeDb (Symbian) Fixed a bug where text would disappear in password fields. Fixed sendEvent call. Removed useless member variable and replaced with var on the stack. Fixed indentation. Fix to S60 softkey pressed down image. Whitespace/tab fixes. s60 application loses normalGeometry when returning from fullscreen Fixing 'softvfp+vfpv2' compiling issue for Tb9.2
| * Fixed casual crash in initializeDb (Symbian)Alessandro Portale2010-02-051-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dynamic_cast should be used carefully with rvct before version 4. We found that out after the a dynamic (down)-cast from CFont* to CFbsFont* in QtGui suddenly failed. We test for (TypeUid() == KCFbsFontUid), before doing the cast. So, a static_cast is safe in this case. Also the other two dynamic_casts in qfontdatabase_s60.cpp were changed to static_cast. http://bugreports.qt.nokia.com/browse/QTBUG-7963 Task-number: QTBUG-7963 Reviewed-by: lars modified: src/gui/text/qfontdatabase_s60.cpp
* | Make sure we define S_IFDIR on WindowsThomas Zander2010-02-041-3/+6
| | | | | | | | Reviewed-by: Thierry Bastian
* | Fix copy/pastoThomas Zander2010-02-042-2/+2
|/ | | | Reviewed-by: trustme
* Fixed text rendering via scaled QPainter on rasterPaintEngine / SymbianAlessandro Portale2010-02-012-18/+60
| | | | | | | | | | | | | | | | | | | | | | | | | Text rendering in Qt for Symbian looks very bad on a scaled QPainter. Instead of simply using a Symbian font with the right size it followed the code path that is usually used for "tricky transformation": Use the glyph outlines and rasterize them in Qt as QPainterPath. That's slow and especially ugly on Symbian since we do not (yet) get the glyph outlines from Symbian. This patch adds QFontEngineS60::setFontScale() so that QFontEngineS60 has one additional native font handle with the scaled size. The raster paint engine will call that function in case that the painter is scaled. Since we already have QFontEngineS60 specific code in the raster paint engine, this patch did not have to add #ifdefs. http://bugreports.qt.nokia.com/browse/QTBUG-7614 Task-number: QTBUG-7614 Reviewed-by: Jason Barron modified: gui/painting/qpaintengine_raster.cpp modified: gui/text/qfontengine_s60.cpp modified: gui/text/qfontengine_s60_p.h
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-01-281-3/+0
|\ | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public: Remove left over forward declarations Avoided the loss of preedit text when losing focus on Symbian. Added support for ifdeffing for manufacturer in generated pkg files Shortening and fixing previous fix for QTBUG-6371 Update default FPU flags on Symbian to be softvfp+vfpv2 Using RunFast mode for RVCT
| * Remove left over forward declarationsAlessandro Portale2010-01-281-3/+0
| | | | | | | | | | | | | | | | Commit d8ad9ac86dac9489b553e6416329308ae7d823d0 fixing QTBUG-6408 made some of the forward declared classes unnecessary. Task-number: QTBUG-6408 Reviewed-by: Alessandro Portale
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-281-0/+5
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (70 commits) doc: Fixed the last qdoc errors. doc: Document the "Type" enum value as a const in variable. Designer: Add lower/raise to context menu. Compile with no-webkit - add missing semi-colons. Fixes visibility update missing when doing setParentItem on graphicsitem Stabilize tst_QGraphicsScene::polishItems2 (new test) Fixed an infinite loop that could occur when reading invalid BMP images. Updated docs regarding QGLWidget::renderText() limitations. Added optimization flag to QGraphicsItemPrivate. Fixed child items with graphics effects not inheriting opacity. Made the trace replayer handle limited resolution cases better. Small optimization in raster paint engine. Another ASSERT while deleting spans Implement QDirectFBPixmapData::scroll Potential crash when adding items from QGraphicsWidget::polishEvent(). QGraphicsWidget is painted twice on the inital show. Fix QPainter::redirection() to pass autotest. Re-added the Close button in QPrintPreviewDialog for Mac/Carbon. revert parts of 10392eef4fd4f9 Fix y-inverted pixmaps properly. ...
| * doc: Specified default values for constructors.Martin Smith2010-01-271-0/+5
| | | | | | | | Task-number: QTBUG-7628
* | Removing unneeded code from QFontEngine::getGlyphPositions()Alessandro Portale2010-01-271-3/+0
|/ | | | | | | | Two QVarLengthArray resizes and one local int variable less. Reviewed-by: Simon Hausmann modified: src/gui/text/qfontengine.cpp
* Fix tst_qmlgraphicstext::letterSpacing tst_qmlgraphicstext::wordSpacing Sent ↵Warwick Allison2010-01-141-1/+9
| | | | | | | | for review into 4.6. Task-number: QTBUG-7326 Signed-off-by: Simon Hausmann <simon.hausmann@nokia.com>