summaryrefslogtreecommitdiffstats
path: root/src/gui/text
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * 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
| |\
| * \ 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
* | | | 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>
* | | qfontengine_win.cpp: special Windows CE code removedJoerg Bornemann2009-10-221-75/+16
|/ / | | | | | | Reviewed-by: thartman
* | 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>
* Small doclet fixThomas Zander2009-10-061-3/+3
| | | | Rev-By: Trust-Me
* Fix QKeySequence::DeleteEndOfWord and QKeySequence::DeleteStartOfWordmae2009-10-051-2/+4
| | | | | | | | | QTextControl showed inconsistent behaviour with DeleteEndOfWord and DeleteStartOfWord when the cursor had a selection. With this patch, the commands will simply delete the existing selection, which is consistent behaviour with in other IDEs. Reviewed-by: Simon Hausmann
* Fix regression in Command link button font sizeJens Bache-Wiig2009-09-091-0/+1
| | | | | | | | | | | | | Since vista style polish sets the font on polish, the check for WA_SetFont will succeed, hence we never set the actual font. I replaced the check with a full resolve. However since the resolve would clear the resolve_mask, from the widget font it has to be restored manually so that QPainter:setFont can resolve it later. Task-number: QTBUG-4646 Reviewed-by: trond
* Make QPF's implementation of alphaMapForGlyph() consistent.Rhys Weatherley2009-09-292-3/+5
| | | | | | | | | | | | | | The QPF implementation of alphaMapForGlyph() was returning color values of RGBA = (a, a, a, 255) instead of (0, 0, 0, a), which was inconsistent with all the other font engines. This inconsistency caused some QPF-specific workarounds in the OpenGL and OpenVG paint engines. This change removes the workarounds and makes QPF generate the right colors from the start. Paint engines that ignore the color table or which don't use the alphaMapForGlyph() function (e.g. raster) are not affected. Reviewed-by: Paul
* doc: Fixed three /sa that should be \saThorbjørn Lindeijer2009-09-281-1/+1
|
* Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2009-09-241-0/+2
|\ | | | | | | | | | | | | Conflicts: examples/webkit/formextractor/formextractor.pro mkspecs/features/qt.prf src/gui/painting/qpaintengineex.cpp
| * Fixed text drawing regression in Assistant.Trond Kjernåsen2009-09-241-0/+2
| | | | | | | | | | | | | | | | Revert parts of adf322c514a5781dcb9ec304d44229fa47d5e8b3 to get this to work as in 4.5.2 again. What the original patch fixed, we don't really know.. Reviewed-by: Simon Hausmann
| * Clean up properly in the QPF1 font enginePaul Olav Tvete2009-09-141-0/+6
| | | | | | | | | | | | | | We have to munmap() what we have mmap()ed Reviewed-by: Gunnar Reviewed-by: Jeremy
| * Update license headers again.Jason McDonald2009-09-0889-356/+356
| | | | | | | | Reviewed-by: Trust Me
* | QTextDocument initial revision after setPlainText/setHtmlmae2009-09-241-0/+4
| | | | | | | | | | | | After separating document revisions from the undo stack, the initial revision after setText/setHtml could get to high. Now it's +1 from the previous revision
* | Only account for a negative right bearing in QTextLayoutEskil Abrahamsen Blomfeldt2009-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | We only want to expand the width of the text, never shrink it. This is so that we can account for text where the pixels of the text extend beyond the edge of the last glyph. When we shrinked the width, code that depended on the natural text width equalling the advance of the text (such as WebKit) broke, and some text items would be positioned wrongly. We now only take negative right bearings into account (right bearing is left-bound), meaning that we only expand the text width, never shrink it due to right bearing. Reviewed-by: Simon Hausmann
* | Fixed a text drawing problem in the GL2 engine under X11.Trond Kjernåsen2009-09-241-1/+1
| | | | | | | | | | | | | | | | In certain situations text would toggle between sub-pixel hinted and normal antialiased, when e.g. drawing menus with -graphicssystem opengl. Reviewed-by: Samuel
* | Fix QTextDocument::revision()mae2009-09-243-23/+17
| | | | | | | | | | | | | | | | | | The revision was bound to the current depth of the undo stack. This had the negative side effect, that equal revisions could point to different documents, and sometimes changes would not even increase the revision (in the case of undo command merging). Reviewed-by: Roberto Raggi
* | QTextCursor selection extension when inserting charactersmae2009-09-231-2/+6
| | | | | | | | | | | | | | | | | | The change makes QTextCursor not extend the selection when inserting characters at the end of the selection, provided that the cursor position is at the end. Reviewed-by: Simon Hausmann Reviewed-by: Roberto Raggi
* | Fix breaking on fixed column width when text has tabsEskil Abrahamsen Blomfeldt2009-09-221-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | When a text in QTextLayout contained tabs, these would be counted as single glyphs when breaking the text on a fixed number of columns, rather than the number of characters they span. The patch calculates the number of characters represented by a tab by using the average character width of the font engine. Task-number: QTBUG-4468 Reviewed-by: Simon Hausmann
* | Fixed text drawing in the GL2 engine after sub-pixel hinting was added.Trond Kjernåsen2009-09-221-0/+6
| | | | | | | | | | | | | | | | | | | | 1. The mono format was not handled at all. 2. We really, really wanted to use sub-pixel hinted glyphs even when they were not available. 3. The glyphFormat type in the FT font engine wasn't updated to reflect the correct system glyph type. Reviewed-by: Kim
* | Made subpixel antialiasing in the GL2 engine work on X11 as well.Samuel Rødal2009-09-212-0/+23
| | | | | | | | | | | | Need to add alphaRGBMapForGlyph to the Freetype font engine. Reviewed-by: Kim
* | Making Keypad Navigation more usableAlessandro Portale2009-09-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All changes of this commit are #ifdef'ed in QT_KEYPAD_NAVIGATION. Most desktop Qts won't notice any change. Navigating between QWidgets was not alwys a pleasure on keypad devices. This commit fixes the navigation behavior for some widgets, mostly itemviews. Furthermore, it adds a 'directional' navigation mode. Until now, the existing keypad navigation used the tab order do go back and forth between widgets. The new mode is supposed to provide a more intuitive navigation. It is the new default mode on Symbian. Screens (and their resolutions) become bigger, and also low resolution screens can be used in landscape mode. That's why the directional mode was requested. Another popular request was to put some more convenience into QSlider: If a (horizontal) slider has focus and the user presses left/right, the value of the slider may directing change without being selected (edit mode). This commit also adds the manual test 'keypadnavigation'. Reviewed-by: Shane Kearns
* | Switch glyph cache from Qt to SymbianLiang QI2009-09-181-1/+2
| | | | | | | | | | | | | | Use Symbian glyph cache directly in QRasterPaintEngine, do not need cache them in Qt if on Symbian Platform. Reviewed-by: Alessandro Portale Reviewed-by: Jason Barron
* | Introduce native Symbian bitmap support to QPixmapJani Hautakangas2009-09-183-11/+23
| | | | | | | | | | | | | | | | | | This is done to reduce heap consumption and to give a possibility to share bitmaps across process. QPixmap maps to Symbian CFbsBitmap which is stored in Symbian font and bitmap server. Reviewed-by: Jason Barron
* | Fix glyph selection in symbol fonts that contain unicode cmap tableEskil Abrahamsen Blomfeldt2009-09-171-14/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | Some symbol fonts will contain a unicode cmap table in addition to the microsoft symbol cmap table that maps the symbol range (private range 0xf000 - 0xf100) into the correct glyphs. This is essentially a broken unicode table, and we should not prefer it if these conditions are true. In the strict cases where these conditions apply, we fall back to the symbol table instead. Task-number: QT-2354 Done-with: Lars Reviewed by: Lars
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Morten Sorvig2009-09-173-6/+12
|\ \
| * | Fix to QSyntaxHighlighter not rehighlighting enoughmae2009-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When entire blocks get deleted, the last block for rehighlighting would be the block _before_ the deleted blocks. This is wrong, since the deleted blocks could have contained characters which affect the state. The patch lets the highlighter check for one more character. Reviewed-by: thorbjorn
| * | QFontMetrics::boundingRect(QString) returns incorrect width on Mac OS XPrasanth Ullattil2009-09-161-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug appears only in Carbon port (ATSUI font engine). While finding the character stops, this font engine relys on the RTL flags. As an optimization, for this particular version of boundingRect(), BIDI is ignored. So for this font engine, we will always use the correct RTL flags. Task-number: 213109 Done-with: Eskil Reviewed-by: Simon Hausmann
| * | Small optimisation in QFontMetrics multi-length-stringOlivier Goffart2009-09-161-4/+6
| | | | | | | | | | | | | | | | | | | | | Change the len instead of copying the string. Idea from Warwick Reviewed-by: Warwick Allison
* | | Improve font handling on Mac/Cocoa.Morten Sorvig2009-09-161-0/+31
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Mac/Cocoa font database currently relies on two APIs, ATSUI (old) and CoreText (new). These are interchangable and work on the same font database. Some differences do exist, in particular ATSFontFamilyGetName seems to return the same as ATSFontGetName for some fonts - the font name, not the family name. In any case, the old ATS code path is initializing QFontDatabase::familes() with the font name. This causes a naming mismatch with code that uses CoreText and gets the proper family name, in this case in initializeDb(). The fix is to make sure the correct family name is used by using the CoreText API to access it. RevBy: TrustMe