summaryrefslogtreecommitdiffstats
path: root/src/gui/text
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-11-122-10/+66
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure doc/src/snippets/code/doc_src_qmake-manual.qdoc mkspecs/features/symbian/application_icon.prf mkspecs/features/symbian/default_post.prf mkspecs/features/symbian/symbian_building.prf qmake/generators/symbian/initprojectdeploy_symbian.cpp src/multimedia/audio/audio.pri src/network/access/qnetworkaccessmanager.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl_p.h src/plugins/bearer/corewlan/qcorewlanengine.mm src/plugins/phonon/mmf/mmf.pro tests/auto/qscriptvalue/tst_qscriptvalue.cpp tests/auto/qscriptvalue/tst_qscriptvalue.h tools/qdoc3/doc/qdoc-manual.qdocconf
| * Fix possible crash in QStaticText and QDeclarativeTextLayoutEskil Abrahamsen Blomfeldt2010-10-292-10/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | The QStaticTextItem held an uncounted reference to QFontEngine. The pointer would dangle in some cases where there was no font object referencing the engine and the cache was cleaned out (e.g. when a new application font is added.) Properly count the reference, and also add reference counting to userData to make it harder to shoot yourself in the foot, since the QStaticTextItem class is now being used in different places, Task-number: QTBUG-14446 Reviewed-by: Martin Jones
* | Fix for font engines that don't support subpixel positioningJiang Jiang2010-11-113-5/+20
| | | | | | | | Reviewed-by: aavit
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-11-104-7/+13
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Amend commit 27fe0f93f961e78b71cd0b729a0e324b847ec023 Fix warnings QtCore autotests: make them paralelized. Fix crash in tst_QByteArray::qUncompress Support glyph subpixel positioning without subpixel rendering
| * | Fix warningsOlivier Goffart2010-11-101-4/+4
| | | | | | | | | | | | | | | | | | Regarding conversion from char* to QString Reviewed-by: Joao
| * | Support glyph subpixel positioning without subpixel renderingJiang Jiang2010-11-103-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously subpixel positioning was only used when subpixel rendering is enabled (glyphType == Raster_RGBMask), however, it does not necessarily require that and for Mac OS X it will keep using subpixel positioning even when LCD font smoothing (subpixel rendering) is turned off. To maintain consistency when switching to raster, we should support subpixel positioning in this case. Task-number: QTBUG-5053 Reviewed-by: Jørgen Lind
* | | Update the text cursor's position for input method events.Pierre Rossi2010-11-102-0/+4
|/ / | | | | | | | | Task-number: QTBUG-2064 Reviewed-by: Jiang Jiang
* | Fix the license in files for LighthouseJørgen Lind2010-10-283-0/+123
| |
* | Add missing QT_MODULE macros.Paul Olav Tvete2010-10-281-0/+2
| |
* | Merge remote branch 'qt/master' into lighthouse-masterPaul Olav Tvete2010-10-266-10/+27
|\ \ | | | | | | | | | | | | Conflicts: src/opengl/qwindowsurface_gl.cpp
| * \ Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2010-10-256-8/+8
| |\ \ | | |/
| | * Fixed many spelling errors.Rohan McGovern2010-10-256-8/+8
| | |
| * | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-10-251-2/+19
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/declarative/snake/snake.qml qmake/generators/symbian/symbiancommon.cpp src/network/access/qnetworkaccessmanager.cpp src/s60installs/s60installs.pro tests/auto/qitemselectionmodel/tst_qitemselectionmodel.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp
| | * Fixed font rendering in manually built Qt on ARMv6.Samuel Rødal2010-10-201-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | The pixelSize ends up being 0 unless these changes are applied. Must be a compiler bug in GCC 4.3.x, fixed in GCC 4.4.1. Reviewed-by: Prasanth Reviewed-by: Olivier Goffart
* | | Merge remote branch 'qt/master' into lighthouse-masterPaul Olav Tvete2010-10-227-48/+98
|\ \ \ | |/ / | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qapplication_win.cpp src/gui/kernel/qwidget.cpp src/gui/text/qfontengine_ft.cpp
| * | Replaced sample text for Japanese fontTasuku Suzuki2010-10-201-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | The previous word was improper because it means "lazy" Task-number: QTBUG-14527 Merge-request: 868 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
| * | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-10-152-26/+45
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qpaintengine_raster.cpp tests/auto/declarative/qdeclarativetext/data/alignments_cb.png tests/auto/declarative/qdeclarativetext/data/alignments_cc.png tests/auto/declarative/qdeclarativetext/data/alignments_ct.png
| | * Remove obsolete tweak in QFontEngineS60::alphaMapForGlyphAlessandro Portale2010-10-121-17/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some Symbian versions (apparently <= Symbian^1), CFont::GetCharacterData() returns 8-bit data with gray values 0x00, 0x10 ... 0xe0, 0xf0 due to a bug. The glyphs are nowhere perfectly opaque, which is bad for blitting. This has been however been fixed for Symbian^3. The funny thing about this tweak was that it was only executed on Symbian^3 (with the OpenVG/OpenGL paintengines). On Symbian^1 and below (rasterpaintengine), QFontEngineS60::alphaMapForGlyph() does not get called at all, anymore. Therefore, the removal of this tweak should not be noticable anywhere, except that on Symbian^3, quite a few CPU cycles are now saved. See the attachments in QTBUG-14419 for details. Task-Number: QTBUG-14419 Reviewed-By: TrustMe
| | * Optimize QFontEngineS60::recalcAdvances()Alessandro Portale2010-10-121-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Addition to ab057be7228d20d909246183505b72e821cc440f) Instead of using a glyph_metrics_t (which gets filled with data from a TOpenFontCharMetrics), we use a TOpenFontCharMetrics, directly. Also, the advances_y gets set to 0. Like on the other platforms. These change increases the Fps in qt\tests\manual\textrendering\textperformance "Latin" from 16.5 to 16.6 Fps on an XM5800. I am sure that I can construct a benchmark where the speed gain is bigger. Task-number: QTBUG-14378 Reviewed-by: TrustMe
| | * Implement QFontEngineS60::emSquareSize()Alessandro Portale2010-10-122-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some glyph position tweaks during the shaping phase require the "Units per Em" information for the font. QFontEngineS60 did not reimplement emSquareSize(), therefore, some combined glyphs were rendered incorrectly (see QTBUG-10725) This patch implements QFontEngineS60::emSquareSize() Since Symbian does not provide the "Units per Em" via public Api, we have to pick that out of the 'head' font table. The value is cached per font. Task-Number: QTBUG-10725 Reviewed-by: Eskil Abrahamsen Blomfeldt
| | * Remove unnecessary calls to GetHorizBounds() + boundingBox()Alessandro Portale2010-10-121-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFontEngineS60::boundingBox_const(): The metrics that CFont::getCharacterData() returns is equivalent to what TOpenFontCharMetrics::GetHorizBounds() returns. So, remove the use of TRect glyphBounds, and TOpenFontCharMetrics::GetHorizBounds(). Implementation of TOpenFontCharMetrics::GetHorizBounds(): http://developer.symbian.org/oss/API_REF/Public_API/file/837f303aceeb/epoc32/include/openfont.h#l1352 QRasterPaintEngine::drawGlyphsS60(): The metrics that QFontEngineS60::getCharacterData() returns are equivalent to what QFontEngineS60::boundingBox() returns. So, remove the use of glyph_metrics_t metrics, and QFontEngineS60::boundingBox(). These changes increase the Fps in qt\tests\manual\textrendering\textperformance "Latin" from 16.2 to 16.5 Fps on an XM5800. And they do that by removing code :) Task-number: QTBUG-14378 Reviewed-by: Jason Barron
| | * Fix memory leak in QFontEngineS60::addGlyphsToPath()Alessandro Portale2010-10-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An "Open()"ed RGlyphOutlineIterator needs to be "Close()"d before destroying the iterator. Otherwise some allocated memory does not get freed. The RGlyphOutlineIterator destructor does not close an open iterator. Task-Number: QTBUG-14408 Done-by: Colleague from Nokia, Oulu Reviewed-by: Alessandro Portale
| * | Fix text position with OpenGL engine and FreetypeEskil Abrahamsen Blomfeldt2010-10-123-12/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you use the OpenGL engine, the left bearing of the glyph was incorrectly retrieved from the system as the glyph was queried with the wrong format, and adjustments for antialiasing were not applied. To make the position identical to painting with, new API was added to QFontEngine (The bounding box of a glyph is also not logically necessarily the same thing as the bounding box of the rasterized glyph.) Done-with: Trond Task-number: QTBUG-14410
| * | Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2010-10-091-6/+10
| |\ \ | | |/
| | * Fix infinite loop when justifying undisplayable Arabic textEskil Abrahamsen Blomfeldt2010-10-081-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the Arabic text is for some reason undisplayable, e.g. because of QTBUG-13132, the font engine will be unable to find the tatweel character and the kashida width may be returned as 0. This would potentially cause an infinite loop, as "need" would remain >= minKashida forever because x - 0 is still >= 0. Task-number: QTBUG-13130 Reviewed-by: Lars
* | | Merge remote branch 'qt/master' into lighthouse-masterPaul Olav Tvete2010-10-058-24/+40
|\ \ \ | |/ / | | | | | | | | | Conflicts: src/gui/painting/qpdf.cpp
| * | Merge remote branch 'origin/4.7' into master-from-4.7Rohan McGovern2010-10-055-17/+23
| |\ \ | | |/
| | * Moving QPdf::stripSpecialCharacter to fontengineJørgen Lind2010-09-305-17/+23
| | | | | | | | | | | | | | | | | | | | | It is only used by the fontengines. This is one of the steps to make it easier to make fontengines build outside of QtGui. Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
| * | Merge remote branch 'origin/4.7' into master-from-4.7Rohan McGovern2010-10-042-1/+17
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/snippets/code/doc_src_qmake-manual.qdoc src/corelib/arch/symbian/arch.pri src/declarative/graphicsitems/qdeclarativeflickable.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h tests/auto/qfontmetrics/tst_qfontmetrics.cpp
| | * Fix QFontMetrics::lineWidth() for fonts with defined point sizeAlessandro Portale2010-09-281-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFontMetrics::lineWidth() and ::underlinePos() return value 1 regardless of the font size if the size was defined in points (instead of pixels). (On Symbian) QFontMetrics::lineWidth() calls QFontEngine::lineThickness() which uses its fontDef.pixelSize in order to come up with a suitable line width. If the QFont size was defined in points, Qt needs to make sure that fontDef.pixelSize is set accordingly. This patch adds the code to make sure that QFontEngine::fontDef always has a valid pixel size. tst_QFontMetrics::lineWidth() was added, wich failed before and passes after this patch. Task-Number: QTBUG-13009 Autotest: Passes Reviewed-By: Eskil
| | * Implemeting, exporting and autotesting QFont::lastResortFont()Alessandro Portale2010-09-281-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An implementation of QFont::lastResortFont() is still(!) missing in Qt 4.7.0. I only became aware of QTBUG-6921, lately. This patch... 1) implements QFont::lastResortFont() in qfont_s60.cpp by first trying to get the lastResortFamily() and then falling back to a hardcoded font. 2) updates the .def files with one additional entry 3) adds an autotest which verifies that lastResortFamily() does return a non-empty string. In the firt place, that autotest makes sure that lastResortFamily() is implemented and exported, so that something like this issue will not go unnoticed in the next Qt port. Task-number: QTBUG-6921 Reviewed-by: Eskil
| * | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-09-281-6/+0
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qrasterizer.cpp src/network/access/qnetworkaccessmanager.cpp tests/auto/qpainter/tst_qpainter.cpp tools/assistant/tools/assistant/mainwindow.cpp
| | * Fix text direction setting in QTextBlock layoutJiang Jiang2010-09-231-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | QTextControl should no longer inherit the layout direction of parent widget as its default text direction. Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Lars Knoll
* | | Merge remote branch 'lighthouse/4.7' into lighthouse-masterPaul Olav Tvete2010-09-303-3/+9
|\ \ \
| * | | Lighthouse: Make application fonts workJørgen Lind2010-09-303-3/+9
| | | | | | | | | | | | | | | | Reviewed-by:paul
* | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qtGunnar Sletta2010-09-2714-65/+77
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | Conflicts: configure src/corelib/global/qglobal.h
| * | | Merge branch 'qt-master-from-4.7' of ↵Qt Continuous Integration System2010-09-222-2/+0
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scm.dev.nokia.troll.no:qt/qt-integration into master-integration * 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: (131 commits) Fix audio glitches in the audiooutput example. apply msvc flags to wince too fix qt static build on wince fix build with QT_NO_GESTURES Fixed drawing a large number of glyphs with the same font under GL. qmake: fix quoting of moc calls Bump version to 4.7.1. Improved output of patch_capabilities.pl script Qt headers must be included before X11 headers Fixes bezier curves not being drawn when it is a line. Button remains pressed if release event happens outside of widget Avoid creating copy of an image in memory when storing as jpeg Use regparm(3) for ICC too, otherwise it's an ABI mismatch in QChar Regenerate the Unicode tables after updates to the generator tool Compile in C++0x mode remove extra includes minor clean-ups minor improvements for data parsers tiny clean-up for generated data move QUnicodeTables:: script() and lineBreakClass() implementations ...
| | * \ \ Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-09-222-2/+0
| | |\ \ \ | | | | |/ | | | |/| | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qtextureglyphcache_p.h src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
| | | * | remove extra includesRitt Konstantin2010-09-212-2/+0
| | | | |
| * | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-09-221-2/+6
| |\ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix C++0x initializer lists tests. Keep other text format with QTextOption::SuppressColors tag on
| | * | | Keep other text format with QTextOption::SuppressColors tag onJiang Jiang2010-09-221-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting the QTextOption::SuppressColors tag on a QTextDocument breaks all text format, not just colors. This patch fix this by selectively ignoring color properties in the format and keeping other properties. Task-number: QTBUG-13090 Reviewed-by: Eskil
| | * | | Make QStaticText honor QPainter::pen() for rich text on X11 w/rasterEskil Abrahamsen Blomfeldt2010-09-201-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The document layou will call setPen() with the PaintContext's text color. If this is different from the current painter settings, the pen will be passed on to the paint engine. The result was that, on X11 using the raster (or opengl) engine, QStaticText would record the pen as changed even when it hadn't explicitly been changed by the document. Task-number: QTBUG-13740 Reviewed-by: Samuel
| * | | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-09-215-9/+26
| |\ \ \ \ | | |/ / / | |/| / / | | |/ / | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.h src/declarative/graphicsitems/qdeclarativeflickable.cpp src/declarative/graphicsitems/qdeclarativeflickable_p_p.h src/declarative/util/qdeclarativelistmodel.cpp
| | * | Make QStaticText honor QPainter::pen() for rich text on X11 w/rasterEskil Abrahamsen Blomfeldt2010-09-201-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The document layou will call setPen() with the PaintContext's text color. If this is different from the current painter settings, the pen will be passed on to the paint engine. The result was that, on X11 using the raster (or opengl) engine, QStaticText would record the pen as changed even when it hadn't explicitly been changed by the document. Task-number: QTBUG-13740 Reviewed-by: Samuel
| | * | Doc: Listed undoable operations in QTextDocumentGeir Vattekar2010-09-151-1/+12
| | | | | | | | | | | | | | | | | | | | Task-number: QT-1212 Reviewed-by: David Boddie
| | * | Merge branch '4.7-upstream' into 4.7-docA-Team2010-09-131-2/+2
| | |\ \
| | | * | Linux: Fix mispositioned, misclipped glyphs in large fonts (QStaticText)Eskil Abrahamsen Blomfeldt2010-09-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While drawText() will use the path fallback for large fonts, and never hit this problem, QStaticText will draw the large fonts into the glyph cache. This broke when the freetype (or any other font engine) falls back to the generic implementation of alphaMapForGlyph() which uses path drawing. The problem was that alphaMapForGlyph() is not supposed to contain the bearing of the glyph, only the actual pixels. Since QFontEngine did not honor this contract, we would sample the wrong area in the glyph cache to get the glyph image. Task-number: QTBUG-12540 Reviewed-by: Gunnar
| | * | | Merge branch '4.7-upstream' into 4.7-docA-Team2010-09-102-2/+4
| | |\ \ \ | | | |/ /
| | | * | Fix cache_cost initialization of QFontEngineMultiWinJiang Jiang2010-09-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally, QFontEngineMultiWin does not set its cache_cost according to the regular font engines it refers to, which makes cache management in QFontCache useless because cache_cost is always 0, and garbage collecting timerEvent can hardly be triggered. This patch solve part of the problem by using cache_cost of the first font engine for QFontEngineMultiWin. However, if a font engine is loaded by QFontEngineMulti::loadEngine, the cost is still not counted. Task-number: QTBUG-12562 Reviewed-by: Eskil Abrahamsen Blomfeldt
| | | * | Fix crash when using unprintable chars in QStaticTextEskil Abrahamsen Blomfeldt2010-09-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assumption that the output glyph array and input glyph array is of equal size is wrong when unprintable characters are used (and discarded in getGlyphPositions()) Task-number: QTBUG-12614 Reviewed-by: Jiang Jiang