summaryrefslogtreecommitdiffstats
path: root/src/gui/text
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Olivier Goffart2011-04-271-10/+6
|\ | | | | | | | | | | Conflicts: src/opengl/qwindowsurface_gl.cpp src/s60installs/eabi/QtGuiu.def
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integrationQt Continuous Integration System2011-04-271-10/+6
| |\ | | | | | | | | | | | | | | | * '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: Ignore changes to selectByMouse during a selection. PathView offset out of sync with currentIndex when items are removed.
| | * Ignore changes to selectByMouse during a selection.Andrew den Exter2011-04-271-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the value of selectByMouse at the time of a mouse press event in all subsequent mouse events in a sequence. This is the same as ignoring the intial mouse press except mouse events for other actions are still accepted. Change-Id: I59b50bf95d26c6320e6e74eeb679b4153e0edf4d Task-number: QTBUG-18887 Reviewed-by: Martin Jones
| * | Let QTextLine decide its own x position in QPainterJiang Jiang2011-04-193-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So that it can take trailing space width into account when doing right aligned text drawing. Backported from master. Task-number: QTBUG-18303 Reviewed-by: Eskil
* | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-04-211-5/+12
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Use binary search to speed up findChildFrame()
| * \ \ Merge remote-tracking branch 'mainline/master'Oswald Buddenhagen2011-04-2133-341/+2622
| |\ \ \
| * | | | Use binary search to speed up findChildFrame()Steffen Hansen2011-04-211-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Merge-request: 2595 Reviewed-by: mae
* | | | | Merge branch 'qt-master-from-4.7' of ↵Qt Continuous Integration System2011-04-201-0/+3
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: (69 commits) Fix compilation with symbian-armcc Updated Russian translation Ukrainian translation updated Fix wrong merge of 3aa39b0164ce4bb9e Symbol table is very limited in numeric input mode Fix build of Qt/DirectFB without graphics view support. Add new QSysInfo::symbianVersion() enums QDesktopServices::openUrl() doesn't handle URL encodings correctly Build fix for transition effect support on S60 5.0. Make EGL surface transparency working on Symbian. QmlDebug: Fix license headers in new ost plugin Fixed autotest after b4b85257ccff6ba21bcbcbd46a9f7f09884abe79 Resolve unqualified attached properties correctly Adding plugin qmltooling/qmlostplugin for QML debugging over OST (USB) on Symbian. QmlDebug: Rename 'tcpserver' library to 'qmldbg_tcp' QDeclarativeDebug: Don't crash when connection is closed Splitview flag should also be updated to inputcontext QGraphicsView with vertical scrollbar flickers when splitview opens Splitview: opening a context menu should not re-position of focusItem Trigger fullscreen transition effects properly on app exit. ...
| * | | | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-04-181-0/+3
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/makefile.cpp qmake/generators/win32/msbuild_objectmodel.cpp qmake/generators/win32/msvc_vcxproj.cpp src/corelib/global/qnamespace.h src/gui/text/qtextcontrol.cpp
| | * | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integrationQt Continuous Integration System2011-04-131-0/+3
| | |\ \ \ | | | | |/ | | | |/| | | | | | | | | | | * '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: Fix TextEdit cursorRectangle property.
| | | * | Fix TextEdit cursorRectangle property.Andrew den Exter2011-04-131-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Translate the cursor rectangle from control coordinates to painting coordinates rather than the other way around, ensure the cursor delegate is also translated, and update the cursor rectangle, cursor delegate and micro focus when the preedit cursor changes position. Change-Id: Iac7a87f7fb965d5f56d059d8f4b97feef8b47789 Task-number: QTBUG-18515 QT-4827 Reviewed-by: Martin Jones
* | | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-04-1931-339/+2620
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Make sure #ifdef'd tests still have main() function Long live QRawFont!
| * | | | Long live QRawFont!Eskil Abrahamsen Blomfeldt2011-04-1931-339/+2620
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging into ↵Qt Continuous Integration System2011-04-182-2/+2
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging: (163 commits) QLocale: Fixed double to currency string conversion on Mac. Fix qstringbuilder4 test on mac Compile on Mac. Revert "HTTP caching internals: fix logic for PreferNetwork and PreferCache" Use the qt_static_metacall in QueuedConnection Fix crash after merge of the native symbian thread branch. Fix bad merge Re-apply part of ba8e5eedf5f40091eb67dd391a7dcaf9299db2f5 Removed useless comment SSL code: introduce new error value for blacklisted certificates Disable DEF files by default for symbian-gcce. HTTP caching internals: fix logic for PreferNetwork and PreferCache Added a consistency check for number of missing symbols in elf2e32. Updated def file after symbol removal. QLocalSocket: fix abort on Windows. QStringBuilder: add operator += for QString and QByteArray Dummy commit to trigger pulse. Fix QMetaObject::indexOfSlot Fix compilation Documentation for the initilize_list constructor ...
| * | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt into earth-masteraxis2011-04-0713-123/+18
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | Conflicts: src/corelib/thread/qthread_unix.cpp
| * | | | Make sure we don't use subpixel positions in full hinting modeJiang Jiang2011-04-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the text can start from subpixel positions (start from 100.5 for instance), we need to make sure they stick to pixel grid in this case. Reviewed-by: Eskil (cherry picked from commit bf03b38d2b32a0cfca181398597884e4252466f4)
| * | | | Compile with QStringBuilder and QByteArrayOlivier Goffart2011-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | Reviewed-by: Denis
| * | | | Chnaged Q_AUTOTEST_EXPORT marco into Q_GUI_EXPORT for QZipWriter classPavel Mogilevskiy2011-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge-request: 1162 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> [ Symbols for QZipReader were previously exported with 959ab5d84d67ec84c2342b083e362ca75613e8cb. There's no good reason not to do the same for QZipWriter. Classes remain private API. -- João ]
| * | | | Fix horizontal centered text drawing without word wrapJiang Jiang2011-04-013-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this case we can't use line width to align the text, we have to use the rectangle width given in QPainter::drawText for alignment instead. Reviewed-by: Eskil (cherry picked from commit b92a31da01ee50fed4b10282e79f812167faf659)
* | | | | Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2011-04-123-1/+11
|\ \ \ \ \ | |_|/ / / |/| | / / | | |/ / | |/| |
| * | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2011-04-113-1/+11
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Make sure removed QTextBlock is invalid
| | * | | Make sure removed QTextBlock is invalidJiang Jiang2011-04-113-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the block is removed from document block map, we will mark the right node to the current head->freelist index, but it shouldn't be accessed directly, otherwise it can cause crash because of uninitialized node. Hence we need to check if a node index is equal to current freelist index. If so, it cannot be a valid block. Task-number: QTBUG-18500 Reviewed-by: Eskil
| * | | | Merge remote-tracking branch 'mainline/4.7' into 4.7Oswald Buddenhagen2011-03-313-3/+6
| |\ \ \ \
| * | | | | Ensure the right font is used for rendering text on MacAndy Shaw2011-03-301-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When ATSFontGetName() did not set name to the font name then it would cause Qt to fall back to a font that was not the right one. Therefore calling ATSFontFamilyGetName() in this case will help ensure it gets the right font. Reviewed-by: Jiang
* | | | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-04-0611-122/+15
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Fixed compilation of qpixmap_raster.cpp Draw graphics item bounding rects drawn when QT_DRAW_SCENE_ITEM_RECTS=1 Put all the declarations of qt_defaultDpi{,X,Y}() in one place Really avoid compiler warnings on Windows Made extension resolving work with Core profile. Avoid some compiler warnings on Windows Fix positioning in GL2 paint engine with subpixel antialiasing Update defs files Doc: Updating 3rdparty license doc Update .def files Another compilation fix for WinCE Updating libjpeg: Add Qt building modifications Updating libjpeg: Add version 8c. Updating libjpeg: Removing libjpeg version 8
| * | | | | | Put all the declarations of qt_defaultDpi{,X,Y}() in one placeJiang Jiang2011-04-058-16/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Samuel Rødal
| * | | | | | Fix positioning in GL2 paint engine with subpixel antialiasingJiang Jiang2011-04-043-106/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this case we will use QTextureGlyphCache with FreeType renderer, which requires the subpixel positition to get correct left bearings, thus alphaMapBoundingBox is extended to support subPixelPosition. In QFontEngineFT we also simplify the code a bit by reusing loadGlyphs for metrics calculation instead of duplicate code. Since we need to use the glyphs after all, cache them here in alphaMapBoundingBox shouldn't be a problem. Reviewed-by: Eskil
* | | | | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-04-051-0/+2
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Add branch prediction macros Add methods for traversing and combining QProcessEnvironment. Handle the HTTP 418 reply properly in QNAM absorb translations.pri into translations.pro let generated flag control SQL generation Add version attributes as per ODF specification
| * | | | | | Add version attributes as per ODF specificationTomas Straupis2011-03-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge-request: 1120 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* | | | | | | Merge branch 'qt-master-from-4.7' of ↵Qt Continuous Integration System2011-04-031-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: (237 commits) Fix animation tests after merge Remove duplicated test. Add missing test file. Changing width of RTL positioner doesn't relayout Fix TextInput auto test failure on mac. PinchArea and Flickable don't work well enough together Do not set focus unnecessarily at window activation in Symbian QS60Style: Regression in drawing dialog background QS60Style: Support menu separator (pt.2) Fix auto test failure. Support for new softkey in Symbian^3 Once Image sourceSize is set there is no way to clear it. Rotation transform with NaN angle can cause crash QSoftkeyManager auto test update Fixed not switching to MeeGo graphicssystem. Canceling image download while reading causes crash Fix width of TextInput micro focus rectangle. Return correct boundaries reasons from QTextBoundaryFinder. GridView jumps to beginning of list when resized Fixed rounding of coordinates pre-transformation in CG paintengine. ...
| * \ \ \ \ \ \ Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-03-311-1/+1
| |\ \ \ \ \ \ \ | | | |_|/ / / / | | |/| | | / / | | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/declarative/example-slideswitch.qdoc doc/src/development/qmake-manual.qdoc doc/src/snippets/code/doc_src_qmake-manual.pro doc/src/snippets/code/doc_src_qtscript.qdoc src/corelib/animation/qabstractanimation.cpp src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def src/s60installs/eabi/QtOpenVGu.def tests/auto/qdir/qdir.pro tests/auto/qsslsocket/tst_qsslsocket.cpp tools/qdoc3/doc/qdoc-manual.qdocconf
| | * | | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integrationQt Continuous Integration System2011-03-281-1/+1
| | |\ \ \ \ \ | | | |_|_|/ / | | |/| | | / | | | | |_|/ | | | |/| | * '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: Fix text selection with shift-click.
| | | * | | Fix text selection with shift-click.Andrew den Exter2011-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the cursor when word selection is NOT enabled. If word selection is enabled then then cursor would have been moved in a previous branch, the (incorrectly inverted) check was to prevent that being overridden. Change-Id: I788c3b41c6fdb250d6086893ea98a1aa8c302514 Task-number: QTBUG-18017 Reviewed-by: Alan Alpert
| | * | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2011-03-251-1/+4
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Make sure num_glyphs pass to HarfBuzz is large enough
| | | * | | | Make sure num_glyphs pass to HarfBuzz is large enoughJiang Jiang2011-03-241-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Backport from master) Currently we only pass the num_glyphs for the run to HB_ShapeItem, but it can be less then the string length for this run because of Unicode surrogates. Thus, we need to pass at least the length of that run as num_glyphs to HB (given that we have enough space allocated because for the entire string), if that's still not enough, we will do ensureSpace again according to the num_glyphs returned by HB and move remaining glyphs backwards. Task-number: QTBUG-15679 Reviewed-by: Lars Knoll
* | | | | | | Make sure we don't use subpixel positions in full hinting modeJiang Jiang2011-04-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the text can start from subpixel positions (start from 100.5 for instance), we need to make sure they stick to pixel grid in this case. Reviewed-by: Eskil
* | | | | | | Fix horizontal centered text drawing without word wrapJiang Jiang2011-03-313-18/+18
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this case we can't use line width to align the text, we have to use the rectangle width given in QPainter::drawText for alignment instead. Reviewed-by: Eskil
* | | | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-03-285-96/+158
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Fix crash and infinite recursion caused by previous commits Fix remaining regressions in QWS Take Xft.hintstyle by default to match the behavior of GTK+ Fixed remaining issues in subpixel positioning with FreeType Fix QTransform debug output qFloor the decoration line width before painting Let QTextLine decide its own x position in QPainter Avoid repeatedly trying to load unloadable plugins, causing slowness Reset GL glyph cache when texture limit is reached unlockFace was put in the wrong place in previous patch Implement subpixel positioning with FreeType
| * | | | | Fix crash and infinite recursion caused by previous commitsJiang Jiang2011-03-282-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: TrustMe
| * | | | | Fix remaining regressions in QWSJiang Jiang2011-03-252-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: TrustMe
| * | | | | Take Xft.hintstyle by default to match the behavior of GTK+Jiang Jiang2011-03-251-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Qt apps running in GNOME, we use the GTK+ settings by default (instead of fontconfig settings). Task-number: QTBUG-13800 Reviewed-by: Samuel
| * | | | | Fixed remaining issues in subpixel positioning with FreeTypeJiang Jiang2011-03-242-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Merge QStaticText and QGlyphs drawing code of raster engine into glyph drawing code for normal QTextItem, it simplify the caching system (we don't use QImageTextureGlyphCache for raster anymore, just glyph set cache in FreeType engine is enough), and fix some regressions in QStaticText and QGlyphs drawing. 2. Fix subpixel positioning support for OpenGL texture glyph cache. Including a transform handling regression introduced by the initial patch. 3. Disable subpixel positioning for bitmap fonts (mono format). After this change, we only have two code paths for glyph rendering with FreeType: raster will always use the simple code path (with QFontEngine_FT cache) while GL will always use QTextureGlyphCache. Reviewed-by: Eskil
| * | | | | unlockFace was put in the wrong place in previous patchJiang Jiang2011-03-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Should only unlock once after the loop. Reviewed-by: TrustMe
| * | | | | Implement subpixel positioning with FreeTypeJiang Jiang2011-03-224-95/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QFontEngineFT are used in raster/OpenGL paint engine and QGLWidget, also in Symbian, etc. We want to make sure it works well in raster and QGLWidget first. Regardless subpixel antialiasing (LCD filtering) is enabled or not (though it does look better when subpixel antialiasing is on). We also need to support transformations. The tricky part here is that, under X11, we have a different code path for QFontEngineFT and other font engines in raster engine, which uses QFontEngineFT's own glyph cache system. While in other platforms (Windows and Mac) and QGLWidget, we will use the generic QTextureGlyphCache. The generic QTextureGlyphCache already has support for subpixel positions, this solution is ported to QFontEngineFT for its QGlyphSet: the key for QGlyphSet hash table has been extended from glyph_t to <glyph_t, QFixed subPixelPosition> pair. The real work to enable subpixel positioning with FreeType is in fact really simple, we just set the horizontal translation to the subpixel position * 64 (FreeType uses a coordinate system of 1/64 of a pixel resolution internally) immediately before loading the glyph. A slight tweek to bitmap width is applied when we are getting the bitmap ourselves instead of using FT_Render_Glyph to accommodate the subpixel translation, which will only be used in non-LCD filtering cases (grayscale antialiasing). From what we have observed, FreeType can generate different bitmaps for at least 12 different subpixel positions (each with a slight difference). To limit the memory consumption, we restrict the number of subpixel positions to be 4 (hardcoded), which should be good enough for most low resolution displays. Subpixel positioning (and fractional glyph advances) will only be enabled when the hintingPreference for the font being used is PreferNoHinting or PreferVerticalHinting. We will use fontconfig hintstyle setting by default when no hintingPreference is set for the font. Task-number: QTBUG-12279 Reviewed-by: Eskil
* | | | | | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-03-221-1/+1
|\ \ \ \ \ \ | |/ / / / / |/| / / / / | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/declarative/positioners/layoutdirection/layoutdirection.qml src/corelib/global/qglobal.h src/plugins/qpluginbase.pri src/qbase.pri src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def tests/auto/selftests/expected_cmptest.txt tests/auto/selftests/expected_crashes_3.txt tests/auto/selftests/expected_longstring.txt tests/auto/selftests/expected_maxwarnings.txt tests/auto/selftests/expected_skip.txt tools/assistant/tools/assistant/doc/assistant.qdocconf tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qdeclarative.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
| * | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2011-03-211-1/+1
| |\ \ \ \ | | |/ / / | | | | / | | |_|/ | |/| | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Don't crash calling QTextDocument::blockBoundingRect on invalid block
| | * | Don't crash calling QTextDocument::blockBoundingRect on invalid blockEskil Abrahamsen Blomfeldt2011-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the block is invalid, QTextBlock::layout() will return 0 and we would dereference a null pointer. Task-number: QTBUG-18192 Reviewed-by: Jiang Jiang
* | | | Merge remote branch 'qt/master' into staging-masterSamuel Rødal2011-03-212-23/+26
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qpnghandler.cpp src/opengl/qwindowsurface_gl.cpp
| * \ \ \ Merge remote-tracking branch 'origin/master' into lighthouse-masterJørgen Lind2011-03-1715-41/+54
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qws/macx-nacl-g++/qplatformdefs.h
| | * \ \ \ Merge remote-tracking branch 'origin/4.7' into HEADThiago Macieira2011-03-161-22/+25
| | |\ \ \ \ | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/symbian-gcce/qmake.conf qmake/generators/metamakefile.cpp qmake/generators/win32/mingw_make.cpp src/corelib/global/global.pri src/corelib/global/qglobal.h src/opengl/qgl.cpp src/opengl/qwindowsurface_gl.cpp src/plugins/platforms/wayland/qwaylandbuffer.h tests/auto/qnetworkreply/tst_qnetworkreply.cpp tools/designer/src/components/formeditor/qdesigner_resource.cpp