summaryrefslogtreecommitdiffstats
path: root/src/gui/text
Commit message (Collapse)AuthorAgeFilesLines
* Qt covers BC break in SymbianAlessandro Portale2009-11-111-2/+25
| | | | | | | | | | | | | | | | | | | | Workaround: fntstore.h has an inlined function 'COpenFont* CBitmapFont::OpenFont()' that returns a private data member. The header will change between minor SDK versions, thus break BC. But Qt has to build on any SDK version and run on other versions of Symbian OS. Also Qt does not want to deliver that BC to Qt based apps. This hack performs the needed pointer arithmetic to get the right COpenFont* pointer, no matter if the 'Flexible Memory Model' is already supported or not. The author is not proud of this commit. Task-number: QT-2250 Reviewed-by: Iain Reviewed-by: Shane Kearns modified: src/gui/text/qfontdatabase_s60.cpp
* Merge branch '4.6-api-review' into 4.6Marius Storm-Olsen2009-11-091-2/+2
|\
| * API review: Rename functions numColors(), setNumColors() and numBytes()Marius Storm-Olsen2009-11-061-2/+2
| | | | | | | | | | | | | | | | | | | | QPaintDevice and QImage used the functions numColors(), setNumColors(), and numBytes(). However, this is not consistent with the rest of the Qt API which uses *Count() and set*Count(). Removed all usage of these functions inside Qt and test-cases. Reviewed-by: Andreas Aardal Hanssen
* | Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2009-11-066-62/+92
|\ \
| * \ Merge commit 'origin/4.6' into 4.6Olivier Goffart2009-11-063-48/+71
| |\ \ | | |/ | | | | | | | | | Conflicts: dist/changes-4.6.0
| | * CompileEskil Abrahamsen Blomfeldt2009-11-061-1/+1
| | | | | | | | | | | | | | | | | | Missing comma in qfontdatabase.cpp Reviewed-by: Gunnar
| | * add support for the N'Ko writing system to QtLars Knoll2009-11-063-47/+70
| | | | | | | | | | | | | | | | | | | | | | | | Enables N'Ko support in Qt, after having now a harfbuzz version that supports it. Task-number: QTBUG-1042 Reviewed-by: Gunnar
| * | Merge commit 'origin/4.6' into 4.6Olivier Goffart2009-11-051-1/+2
| |\ \ | | |/
| * | Fix textControl so that it ignores mouse press events when neededThierry Bastian2009-11-052-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | This fixes the issue in the itemviews that the selection would not change when clicking on rich text labels. Task-number: QTBUG-4516 Reviewed-by: ogoffart
| * | Merge commit 'origin/4.6' into 4.6Olivier Goffart2009-11-046-39/+71
| |\ \
| * | | QCSSParser: Fixes the way spaces are handled in font family.Olivier Goffart2009-11-021-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot simplify spaces because a font may have several spaces in its name. If we only add spaces when needed when merging tokens, we don't need to simplyfy the string later The CSS tokenizer will already make sure that spaces are removed if there is no quotes (btw, the CSS specification says that there must be quotes if there is spaces, but we tollerate if there is no quotes) Reviewed-by: Jocelyn Turcotte Task-number: QTBUG-4344 Task-number: 258586
* | | | Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2009-11-043-40/+38
|\ \ \ \ | | |_|/ | |/| |
| * | | Merge branch '4.6-s60' into 4.6axis2009-11-041-1/+2
| |\ \ \ | | |_|/ | |/| |
| | * | Fixed an input method bug when erasing the last character.axis2009-11-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we didn't update the editor contents if the new preedit string was empty. However, it could be empty because the user just erased it, so the bug was fixed by checking whether the preedit string in the event and in the editor are different. RevBy: Denis Dzyubenko
| * | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-11-039-46/+78
| |\ \ \ | | |/ /
| | * | fix font height calculation on QWSJoerg Bornemann2009-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | fontDef.pixelSize is a qreal now and we should round it after multiplication to avoid an accuracy loss. Reviewed-by: mae
| * | | Avoid infinite loop when laying out text with unconvertible charsEskil Abrahamsen Blomfeldt2009-10-291-38/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the stringToCMap() fails, it can be because it did not have enough space in the layout, or it can because of other errors. In order to implement "try-again" processing in a simple way, we had an infinite loop which assumed that stringToCMap() would always succeed in the second run (which would be the case if the only possible error was "not enough space".) Since there are other possible failures not related to the number of glyphs, you could easily get into an infinite loop here, e.g. when laying out text that contains the Byte Order Mark. The fix changes the implementation to explictly try stringToCMap() twice at max, and is also how it's implemented in the default qtextengine.cpp. Task-number: QTBUG-4680 Reviewed-by: Trond
* | | | QPlainTextEdit redraw issue in QTextControlmae2009-11-041-1/+3
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is an optimization in QTextControl, that it only requests updates for single blocks if only a single block was changed. This update was requested with the block's bounding rectangle. In the case of disabled line wrapping in combination with a very long line, a block change can result in a narrower block bounding rectangle. This then resulted in pixel on the screen not being redrawn properly. The fix enlarges the requested update rectangle horizontally. The bug was discovered during inhouse Qt Creator testing. Reviewed-by: Oswald Buddenhagen
* | | Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2009-11-026-45/+44
|\ \ \
| * \ \ Merge commit 'origin/4.6' into featureJørgen Lind2009-11-027-50/+47
| |\ \ \ | | | |/ | | |/|
| | * | Merge commit 'widget/4.6' into origin/4.6Olivier Goffart2009-10-305-45/+42
| | |\ \ | | | |/ | | |/| | | | | | | | | Conflicts: src/gui/effects/qgraphicseffect.cpp
| | | * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-widget-team into 4.6Jan-Arve Sæther2009-10-281-8/+10
| | | |\
| | | | * Qt::escape(): also escape the quote (")Olivier Goffart2009-10-281-22/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This amend previous commit by removing the duplicate function. The quote need to be escaped in attributes. Reviewed-by: Thomas Zander
| | | | * Fix XML entities in QTextDocument::toHtml()Thorvald Natvig2009-10-281-7/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a QTextDocument contains an anchor with a & in it, this & is not escaped in the toHtml() function, meaning the resulting document can't be parsed as XML as it will contain invalid entities. Reviewed-by: Olivier Goffart Merge-request: 1753
| | | * | Merge branch 'fixes' of ↵Jan-Arve Sæther2009-10-2815-45/+132
| | | |\ \ | | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | git://gitorious.org/~fleury/qt/fleury-openbossa-clone into openbossa-fleury-fixes3 Conflicts: src/gui/graphicsview/qgraphicsanchorlayout_p.cpp src/gui/graphicsview/qgraphicsanchorlayout_p.h
| | | * | Always use QExplicitlySharedDataPointer<QFontPrivate>Andreas Kling2009-10-274-37/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a refcount bug that occurs when QFont is constructed from a QFontPrivate* that was created without an initial ref(). Merge-request: 1831 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
| * | | | Fix LIBRARY and ICONJørgen Lind2009-10-291-0/+2
| | |_|/ | |/| | | | | | | | | | | | | | | | | | However, compiling with QT_NO_ICON will still not work :( Reviewed-by: tom
* | | | Merge commit 'mainline/4.6' into 4.6hjk2009-10-302-5/+5
|\ \ \ \ | | |/ / | |/| |
| * | | Cocoa: Synthesize italic text correct way when adding glyphs to pathEskil Abrahamsen Blomfeldt2009-10-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Mac OS X, Cocoa, we would synthesize italics on the text by slanting it in the incorrect direction (so it leaned to the left) when generating a path from the text, e.g. when printing. The patch makes the text slant the correct way, and the logic now becomes identical with the synthesized italics in the draw() function. Task-number: QTBUG-4969 Reviewed-by: Trond
| * | | Fixed PDF generation for Windows.Trond Kjernaasen2009-10-261-4/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | Font names were not retrieved correctly after the QT_WA removal patch. The old code always used the GetTextOutlineA() API, except for WinCE, even when a Unicode compatible Windows platform was used. Reviewed-by: Kim
* | | introduce int QTextDocument::available{Undo,Redo}Steps() const;hjk2009-10-303-0/+33
|/ / | | | | | | | | | | | | | | | | | | Formerly, QTextDocument::revision() could be used to guesstimate the number of available undo steps that was used in Qt Creator to store cursor positions in parallel to the actual text contents. Now that revision() is strictly increasing, another means is needed, therefore the new functions providing the needed data. Reviewed-by: mae
* | Make compile on X11 systems where qreal == floatRhys Weatherley2009-10-261-1/+1
| | | | | | | | Reviewed-by: Sarah Smith
* | Compile on QWSAnders Bakken2009-10-231-1/+1
| | | | | | | | | | | | | | | | After 04d18b38c38c5ff623b30366ea08d56128b9b7d0 Qt didn't compile for QWS. Will email original committer to verify that original intent is maintained. Reviewed-by: Donald Carr <donald.carr@nokia.com>
* | Line spacing fixesJoerg Bornemann2009-10-2314-43/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTextEdit (via QTextLayout) and QPlainTextEdit in Qt used to ignore any font leading but added one extra pixel in QFontMetrics. With many freetype fonts, this resulted in a "spacy" text layout. The necessary fixes on X11 and Windows were to take (positive) leading into account, to make the font database convert point sizes to pixel sizes without rounding to plain integer values, and to subtract the extra pixel from QFontMetrics from the font engines' descent value. The change also fixes several places in styles and widgets, where QFontMetrics::lineSpacing() was wrongly used instead of QFontMetrics::height(). Ideally we should also handle negative leading, which would require additional and bigger code changes in QTextLayout and QPlainTextEdit. In addition, all other editors we have tested seem to ignore leading on X11. If we choose to believe the values provided by freetype, our text layout would be one pixel smaller than everybody else's. On the Mac, this change does nothing. There our layout is still too spacy, and for smaller fonts quite ugly compared to native Mac applications. Done with mae. Reviewed-by: mae
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-231-75/+16
|\ \ | |/
| * qfontengine_win.cpp: special Windows CE code removedJoerg Bornemann2009-10-221-75/+16
| | | | | | | | Reviewed-by: thartman
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-graphics-team into 4.6Gunnar Sletta2009-10-221-1/+1
|\ \ | |/ |/|
| * Improved QFontInfo::pointSize() slightly on X11.Kim Motoyoshi Kalland2009-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | In non-GUI applications on X11, QFont and QFontInfo return different point size because for QFontInfo, the point size is converted to pixel size and back, but with different dpis. This commit improves the situation for the case where font config is used, but the bug still needs to be fixed properly by using the same dpi for all point<->pixel size conversions. Reviewed-by: Trond
* | Fix bug QTBUG-4848Sarah Smith2009-10-202-9/+14
| | | | | | | | | | | | | | | | Make the shapeText function return numGlyphs properly - its not always the same as length of string. Task-number: QTBUG-4848 Reviewed-by: Rhys Weatherley
* | Fixed bad glyph rendering under cocoaGunnar Sletta2009-10-192-18/+47
|/ | | | | | The positioning is still wrong, but now it at least the glyphs are ok Reviewed-by: msorvig
* Second attempt: Fixed a few compiler warnings from QtGui for Symbian.Janne Anttila2009-10-131-0/+1
| | | | | | | The previous commit 9c6e466dc09813dd4a641b2cf385f35ac99346f5 included some changes which were not meant to be pushed. Reviewed-by: TrustMe
* Revert "Fixed a few compiler warnings from QtGui for Symbian."Janne Anttila2009-10-131-1/+0
| | | | | | Accidentally used git commit -a when should have used only git commit :( This reverts commit 9c6e466dc09813dd4a641b2cf385f35ac99346f5.
* Fixed a few compiler warnings from QtGui for Symbian.Janne Anttila2009-10-131-0/+1
| | | | Reviewed-by: TrustMe
* Make QTextControl give the right default action to Drag managerShane Kearns2009-10-121-2/+6
| | | | | | | | | | When dragging text from a non editable widget, QTextControlPrivate was passing allowed actions = CopyAction, default action = MoveAction. Default action is always used if you don't press any modifier keys, so text could be moved (cut) out of a non editable widget such as QLabel Task-number: QTBUG-4356 Reviewed-by: Aleksandar Sasha Babic
* Make writing out word-spacing use the right property.Thomas Zander2009-10-121-2/+2
| | | | | | | | ODF seems to not specify this property, while xslt (which odf copied for this) does, writing it out will be much more useful than loosing the info silently, though. Reviewed-by: Denis Dzyubenko
* Fixed a bug visible in QPrintPreview with the X11 XLFD font engine.Trond Kjernåsen2009-10-121-1/+1
| | | | | | | QFontEngineXLFD::boundingBox() function did not take justification into account when calculating the bounding box for a set of glyphs. Reviewed-by: Eskil
* Fix compile error on symbian platformShane Kearns2009-10-091-0/+4
| | | | Reviewed-by: Espen Riskedal
* Fix printing bitmap fonts on X11 with FontConfig enabledEskil Abrahamsen Blomfeldt2009-10-093-11/+24
| | | | | | | | | | | | | | | | | When FontConfig was enabled, bitmap fonts would often get a different pixel size than the one we requested. Usually the size would only be a pixel off, but this was especially visible when printing in highres with bitmap fonts, because in those cases we would request a pixel size which was computed based on the printer's high dpi. The result was that all printed text with bitmap fonts would be really really tiny. The fix falls back to using the XLFD font engine when using bitmap fonts (when the returned pixel size is different from the requested), because this engine scales the fonts for us. This will cause bitmap fonts to be rendered without antialiasing. Task-number: QTBUG-3620 Reviewed-by: Simon Hausmann
* Fixed text positioning when printing in HighResolution on Mac OS XGunnar Sletta2009-10-091-3/+4
| | | | Reviewed-by: Richard
* Fix compilation with -pedanticDavid Faure2009-10-071-1/+1
| | | | | Merge-request: 1716 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>