summaryrefslogtreecommitdiffstats
path: root/src/gui/text
Commit message (Collapse)AuthorAgeFilesLines
* Compile fix for -qpa/Linux.Friedemann Kleint2011-05-232-0/+3
| | | | Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Merge remote branch 'staging/master' into refactorSamuel Rødal2011-05-201-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/opengl/qgl_qpa.cpp src/plugins/platforms/glxconvenience/qglxconvenience.cpp src/plugins/platforms/platforms.pro src/plugins/platforms/wayland/qwaylandwindow.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/plugins/platforms/xcb/qxcbwindow.h src/plugins/platforms/xcb/qxcbwindowsurface.cpp src/widgets/kernel/qwidget_qpa.cpp tests/auto/qvariant/tst_qvariant.cpp
| * Fix broken drawing with large fonts using QStaticText and FreeTypeEskil Abrahamsen Blomfeldt2011-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In FreeType, there's a fall back to QFontEngine::alphaMapForGlyph() when the fonts are very large. Since this uses a QPainterPath containing an unhinted glyph, the use of hinted metrics would sometimes lead to the glyphs being clipped because they would be positioned slightly outside the image they were painted into. When outline drawing is on, it makes sense to return unhinted metrics, since the glyphs we will actually use are unhinted. Task-number: QTBUG-19067 Reviewed-by: Jiang Jiang
* | Merge remote branch 'origin/master' into refactorLars Knoll2011-05-1211-36/+82
|\| | | | | | | | | | | | | | | Conflicts: src/gui/gui.pro src/gui/painting/painting.pri src/opengl/opengl.pro src/openvg/openvg.pro
| * Move QTextCursor::MoveStyle to Qt namespaceJiang Jiang2011-05-119-31/+27
| | | | | | | | | | | | | | | | | | | | We cannot use QTextCursor::MoveStyle enums in QTextLine because QTextCursor is not a QObject, while referring to that enum in Q_PROPERTY requires it to be. That's why we need to move the enums in Qt namespace. Reviewed-by: David Boddie (cherry picked from commit 5eba82b752e85a5d6cb3a893214ed2646d75f362)
| * Add some QRawFont related low level functions to avoid extra copyingJiang Jiang2011-05-112-5/+55
| | | | | | | | | | | | | | | | | | | | | | | | Added functions: - QRawFont::glyphIndexesForChars(const QChar *chars, int numChars, quint32 *glyphIndexes, int *numGlyphs) const - QRawFont::advancesForGlyphIndexes(const quint32 *glyphIndexes, QPointF *advances, int numGlyphs) const Reviewed-by: Eskil (cherry picked from commit 965af9eb2932efae5d736df54c3859460017b6a5)
* | Merge remote branch 'staging/master' into refactorSamuel Rødal2011-05-1113-226/+181
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qdrawhelper_p.h src/gui/painting/qgraphicssystemfactory.cpp src/gui/painting/qpainter.cpp src/gui/painting/qunifiedtoolbarsurface_mac.cpp src/gui/painting/qunifiedtoolbarsurface_mac_p.h src/openvg/openvg.pro src/openvg/qpaintengine_vg.cpp src/openvg/qwindowsurface_vg.cpp src/openvg/qwindowsurface_vgegl.cpp src/plugins/platforms/wayland/qwaylanddisplay.cpp src/widgets/graphicsview/qgraphicsscene.cpp
| * Merge remote-tracking branch 'staging/master'Olivier Goffart2011-05-101-2/+2
| |\
| | * Compile on MacEskil Abrahamsen Blomfeldt2011-05-101-2/+2
| | | | | | | | | | | | | | | | | | | | | Missing API update in Q_WS_MAC block Reviewed-by: Jiang Jiang (cherry picked from commit 4b95d9939db75d7bd55db4bbbf2d67af459f7eb5)
| * | Fixes warnings about unused variablesOlivier Goffart2011-05-102-2/+1
| | | | | | | | | | | | | | | Reviewed-by: Samuel (cherry picked from commit 28061caa38d94de85db9aec743d1efba33c1e46f)
| * | Make text rendering working outside the gui thread on Symbian.Laszlo Agocs2011-05-101-11/+19
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | It was previously not possible to render text (QPainter::drawText) in a secondary thread on Symbian, it always resulted in some kind of panic. This patch corrects it. For S60 5.0 and earlier the behavior is not changed, threaded text rendering is only supported on Symbian^3 and newer. This also means QFontDatabase::supportsThreadedFontRendering() will return true from now on, but only on Symbian^3 and higher. Task-number: QTBUG-18516 Reviewed-by: mread (cherry picked from commit 0c62e02b80570bf8b92eff7acceb9018df61c89e)
| * Rename QGlyphs -> QGlyphRunEskil Abrahamsen Blomfeldt2011-05-109-120/+121
| | | | | | | | | | | | | | | | | | | | | | API clean-up for QGlyphRun: 1. QGlyphs -> QGlyphRun 2. QGlyphRun's font()/setFont() -> rawFont()/setRawFont() 3. QPainter::drawGlyphs() -> drawGlyphRun() 4. QTextLayout and QTextFragment's glyphs() -> glyphRuns() Reviewed-by: Jiang Jiang (cherry picked from commit 84ef364302728b68d2d29ea9c4ccbec32c7bb115)
| * 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 (cherry picked from commit 821b8b540af491ce60d35bd84d3c91399ecc0d16)
| * Only enable design metrics for scalable fontsJiang Jiang2011-05-051-1/+1
| | | | | | | | | | | | | | Bitmap fonts don't have linear advance at all. Reviewed-by: Eskil (cherry picked from commit 111accbf9aaf95b052448ecb70937c61e9b59d66)
| * Add a way to retrieve CTFontRef from QFontJiang Jiang2011-05-052-3/+6
| | | | | | | | | | | | | | | | | | Since macFontID restricts to quint32, we have to return that in QFont::handle. Task-number: QTBUG-17890 Reviewed-by: Eskil (cherry picked from commit c8f299b7e675c839b16d750cd2633a57cdd0526f)
| * Remove QFontEngineFT::loadGlyphMetricsJiang Jiang2011-05-042-101/+0
| | | | | | | | | | | | | | It is no longer used and was accidentally merged back in. Reviewed-by: Eskil (cherry picked from commit 782535ac548c582542bd1c17207e288e816870a8)
| * Add required font metrics functions to QRawFontJiang Jiang2011-05-042-0/+56
| | | | | | | | | | Reviewed-by: Eskil (cherry picked from commit 2c8df8bfb679885c3cbd2ee02f5e4053fdd554c2)
* | get QtWidgets to linkLars Knoll2011-05-073-3/+3
| | | | | | | | | | some more changes, mainly exporting methods from QtGui to get QtWidgets to link.
* | make the new QtGui compileLars Knoll2011-05-073-4/+8
| |
* | compile fixesLars Knoll2011-05-051-1/+3
| |
* | remove some more qapp dependenciesLars Knoll2011-05-051-7/+2
| |
* | special directory for stuff we want to move from widgets to guiLars Knoll2011-05-055-5982/+0
| | | | | | | | | | | | | | Create a special to_be_moved directory, that will contain files that are to be moved from QtWidgets to QtGui. This will allow us to do a first split of the libraries rather fast and we can then start pulling in these classes one by one.
* | remove some dependencies to QTextEditLars Knoll2011-05-053-17/+14
| | | | | | | | | | | | | | QSyntaxHighlighter is now free of dependencies to QtWidgets. QTextImageHandler still needs some work to get the url resolving to work again.
* | remove some QApplication dependenciesLars Knoll2011-05-053-27/+3
| |
* | move platform specific files out of the wayLars Knoll2011-05-0421-13391/+0
| | | | | | | | | | | | | | Keep the files as reference to implement the lighthouse plugins, but move them away from the main directory hierachy as they won't be part of Qt5 in any case.
* | moving some more files around.Lars Knoll2011-05-043-2/+2293
| |
* | Merge remote branch 'origin/master' into refactorLars Knoll2011-05-0439-430/+914
|\|
| * Merge branch 'master' of scm.dev.nokia.troll.no:qt/qtbase-stagingGunnar Sletta2011-05-041-0/+8
| |\
| | * Include pixel size of font in exported HTML from QTextDocumentEskil Abrahamsen Blomfeldt2011-05-041-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you copy-pasted rich text in which the font size had been set using setPixelSize() the font size would be mysteriously forgotten. The pixel size property in QTextCharFormat was added ad hoc, and not integrated in the HTML exporter. Task-number: QT-4792 Reviewed-by: Gunnar (cherry picked from commit 5aa5c2e2935c1829cc6965198968699f17c24ec0)
| * | Make pixel size a qreal in QRawFontEskil Abrahamsen Blomfeldt2011-05-022-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The pixel size in the font engines is already a floating point value. For maximum flexibility, we should expose this in the public API. Task-number: QTBUG-18817 Reviewed-by: Jiang Jiang (cherry picked from commit ac9e63b58533a3215106ed9da82cff3a3e3dda3a)
| * | Support more items for QTextCharFormat::VerticalAlignment enum for custom ↵Dmitry Zelenkovsky2011-05-022-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | text objects. * QTextCharFormat::AlignNormal - support text format descent, place text object bottom on (baseline - descent). * QTextCharFormat::AlignBottom - place text object bottom on baseline. * QTextCharFormat::AlignTop - Still not supported. * Any other vertical alignment is mapped QTextCharFormat::AlignBottom. Add new enum AlignBaseline for custom inline objects to take into account font baseline. Merge-request: 2578 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> (cherry picked from commit ee9455ed2a83084692d969c398ecb91bcd4fc33a)
| * | Use maximum ascent/descent/leading from fallback fonts in shapingJiang Jiang2011-04-296-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 (cherry picked from commit c501403cb5a0c9ec21b00e0c2f640ae85566e0cf)
| * | Another ugly hack to make bidi cursor work with Core TextJiang Jiang2011-04-291-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 (cherry picked from commit a36ac6c34bafa801c2c30d76f59e4a3594efc4d5)
| * | Make sure layoutData exist before checking for string directionJiang Jiang2011-04-291-0/+2
| | | | | | | | | | | | | | | | | | | | | Otherwise accessing that through QTextEngine::alignLine may cause crash. Reviewed-by: Samuel Rødal (cherry picked from commit dcdb62c3d1a76d951c4b65bc1b1bd930e2ad14ec)
| * | Take leading space width into account for painting and selectionJiang Jiang2011-04-292-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When painting horizontally centered RTL text and selection with trailing spaces, we need to take that space width into account because line.textAdvance doesn't include it. Task-number: QTBUG-18612 Reviewed-by: Eskil (cherry picked from commit 224226727f07e8940e0d3131fe7587b11cc4a6ca)
| * | Remove extra comma at the end of enum listJiang Jiang2011-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | It fails compilerwarnings test. Reviewed-by: TrustMe (cherry picked from commit 1e847c00dcf4948b8892d0a552576e1d3ea554b9)
| * | Turn on HarfBuzz support for Mac/CocoaJiang Jiang2011-04-292-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's possible to enable HarfBuzz text layout on Mac by either: - Set QT_ENABLE_HARFBUZZ environment variable when running a Qt app. - configure with -harfbuzz to build Qt, then HarfBuzz support will be turned on by default. HarfBuzz will only be used when the font explicitly requested is supported by HarfBuzz (aka. TrueType/OpenType font), other fonts (AAT fonts) will still be handled by Core Text. Using HarfBuzz for text layout will hopefully solve most tricky complex text shaping bugs on Mac. Task-number: QTBUG-17728 Reviewed-by: Eskil
| * | Support visual cursor movement for BIDI textJiang Jiang2011-04-2910-266/+584
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bidi input can in some contexts be more intuitive if the cursor works in visual way: pressing left arrow key always make cursor move one character to the left regardless the language of text, pressing right arrow key always make cursor move to the right. It is also the behavior of Mac OS X. Based on the above reason and requests from Symbian we implemented this support for visual movement in BIDI text. 3 public properties are added to QTextDocument, QTextLayout and QLineEdit respectively: - QTextDocument::defaultCursorMoveStyle can be used to control the cursor behavior in all widgets based on QTextDocument, like QTextEdit, QPlainTextEdit, etc. When set to QTextCursor:: Visual, it will enable visual movement for all the cursors in the corresponding text edit. Default is QTextCursor::Logical. - QTextLayout::cursorMoveStyle is used for low-level cursor manipulation. When set to Visual, it will enable visual movement behavior for all the cursor related methods, including cursorToX, xToCursor and drawCursor. Default is Logical. - QLineEdit::cursorMoveStyle is used to control cursor movement behavior in QLineEdit. Default is Logical.: Task-number: QTBUG-13859 Reviewed-by: Eskil (cherry picked from commit c480dd641f5d22d1ee72cb27bf39e24c6df65658)
| * | Make sure QFont's resolve mask is copied on compilers with C++0x supportEskil Abrahamsen Blomfeldt2011-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The QFont consists of a d pointer and a resolve mask, and they should both be copied in the assignment operator. Task-number: QTBUG-18921 Done-by: Friedemann Kleint (cherry picked from commit cb5e526c6023237c36aac3446a0a18288f39f3a9)
| * | Fix glyph position issue with fallback fontsJiang Jiang2011-04-291-0/+3
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-18933 Reviewed-by: Eskil (cherry picked from commit 18fcbf7ae41504324cd453ba9b9655f3e94f6495)
| * | doc: Minor cleanup in QGlyphs docsEskil Abrahamsen Blomfeldt2011-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Just a minor clean-up in the QGlyphs docs. Mainly to try to trigger CI. Reviewed-by: TrustMe (cherry picked from commit 774b5b8c6a627fc90fb7382bc907db5d2e8193bf)
| * | doc: Simplify language in QGlyphs docsEskil Abrahamsen Blomfeldt2011-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | Mainly to trigger CI. Reviewed-by: TrustMe (cherry picked from commit 1a1683c2d57debbb3e7f3ae6001eb2c8685dca02)
| * | Make QtQuick2 compile on QPAEskil Abrahamsen Blomfeldt2011-04-2820-125/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Initial import from qtquick2.Qt by Nokia2011-04-274-16/+13
| |/ | | | | | | | | Branched from the monolithic repo, Qt qtquick2 branch, at commit a4a585d2ee907746682846ae6e8a48e19deef469
* | remove dependency to QStyle::visualAlignmentLars Knoll2011-05-042-3/+2
| | | | | | | | | | | | | | The current position of the code in QGuiAppPrivate is a bit messy, but we can later on consider consolidating some of this in some helper namespace.
* | small cleanupsLars Knoll2011-05-042-4/+4
| |
* | move keyboardInputLocale and keyboardInputDirection into QGuiApplicationLars Knoll2011-05-043-5/+4
| |
* | less qapp includesLars Knoll2011-05-043-4/+0
| |
* | Remove more QApp dependenciesLars Knoll2011-05-044-61/+44
| | | | | | | | | | | | platformIntegration() lives in QGuiApplication QFont and QFontDatabase can live with QGuiApp only as well.
* | even less QT3_SUPPORTLars Knoll2011-05-035-75/+0
| | | | | | | | | | the new libQtGui should now be free of any Qt3 related methods.