| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Otherwise accessing that through QTextEngine::alignLine may cause crash.
Reviewed-by: Samuel Rødal
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Reviewed-by: Samuel Rødal
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Reviewed-by: TrustMe
|
|
|
|
|
|
|
|
| |
So that if these font engines are deallocated elsewhere (by
QFontCache for instance), we can still access them in QTextEngine.
Task-number: QTBUG-17603
Reviewed-by: Eskil
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
examples/webkit/imageanalyzer/imageanalyzer.h
examples/webkit/imageanalyzer/mainwindow.h
mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h
src/corelib/io/qfsfileengine_iterator_unix.cpp
src/corelib/io/qfsfileengine_iterator_win.cpp
src/corelib/kernel/qcoreapplication.cpp
src/network/access/qnetworkaccessdatabackend.cpp
src/plugins/bearer/connman/qconnmanservice_linux.cpp
src/plugins/platforms/openvglite/qwindowsurface_vglite.h
src/s60installs/bwins/QtCoreu.def
src/s60installs/eabi/QtCoreu.def
src/s60installs/s60installs.pro
tools/assistant/tools/assistant/helpviewer_qwv.h
tools/qdoc3/test/qt-html-templates.qdocconf
|
| |
| |
| |
| | |
Reviewed-by: Trust Me
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Fixes crash in QGraphicsItem's destructor.
Doc: Fixing typo
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
operator[]
Improves scrolling in testfile content.xml attached to QTBUG-9549.
According to callgrind, the improvement is nearly 35% (comparing total incl. cost of QTextEngine::setBoundary)
total incl cost / calls to setBoundary =
before: 6.0883269E9 / 46520 = approx. 130875.47
after: 2.4834313E9 / 29370 = approx. 84556.733
in relation this gives us: 84556.733 / 130875.47 = approx. 0.64608542
Merge-request: 975
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A single digit after RTL text will be considered as RTL because it
was treated as Other Neutral (DirON), it can be solved by changing
it to DirAN.
Task-number: QTBUG-2795
Reviewed-by: Lars Knoll
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
bin/syncqt
demos/declarative/snake/content/snake.js
demos/declarative/snake/snake.qml
doc/src/development/qmake-manual.qdoc
src/corelib/plugin/plugin.pri
src/gui/kernel/qapplication_win.cpp
src/gui/kernel/qdesktopwidget_win.cpp
src/gui/painting/qdrawhelper.cpp
tests/auto/qdir/tst_qdir.cpp
tools/qdoc3/test/assistant.qdocconf
tools/qdoc3/test/designer.qdocconf
tools/qdoc3/test/linguist.qdocconf
|
| |
| |
| |
| |
| |
| |
| |
| | |
The behavior of Qt with these characters was different than other
toolkits, which annoys some people.
Task-number: QTCREATORBUG-2241
Reviewed-by: mae
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
... on re-allocation failure. So, let's actually check the returned
pointer and fail, instead of using Q_CHECK_PTR.
Task-number: QT-3785
Reviewed-by: Peter Hartmann
Reviewed-by: Samuel Rødal
|
|\ \
| |/
| |
| |
| |
| |
| | |
Conflicts:
qmake/generators/win32/msbuild_objectmodel.cpp
qmake/generators/win32/msvc_vcxproj.cpp
tests/auto/qnetworkreply/tst_qnetworkreply.cpp
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit 07880542ecc479807c23c5646d263135240822ff introduced regression to
QFontMetrics::boundingRect and QTextEngine::boundingBox on FT, XLFD and
QPF font engine. Because on these platforms, rightBearing of the last
glyphs is already removed from the width returned in glyph_metrics_t.
Subtracting that rightBearing twice will cause the resulting boundingBox
smaller than expected.
This patch fix this by removing last right bearing accounting code from
generic QTextEngine::boundingBox, instead, we put it into font engines
that need them: QFontEngineWin, QCoreTextFontEngine, QFontEngineMac,
QFontEngineS60 and QFontEngineQWS. So that the resulting width should be
correct on all platforms without introducing any performance penalties.
Task-number: QTBUG-6854, QTBUG-12950
Reviewed-by: Eskil
|
| |
| |
| |
| |
| | |
Task: http://bugreports.qt.nokia.com/browse/QTBUG-231
Reviwed-by: Eskil
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/gui/painting/qpainter.cpp
src/gui/text/qtextengine.cpp
tests/auto/qimage/tst_qimage.cpp
tests/auto/qpainter/tst_qpainter.cpp
tools/qdoc3/test/assistant.qdocconf
tools/qdoc3/test/designer.qdocconf
tools/qdoc3/test/linguist.qdocconf
tools/qdoc3/test/qmake.qdocconf
tools/qdoc3/test/qt-build-docs.qdocconf
tools/qdoc3/test/qt-html-templates.qdocconf
tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf
tools/qdoc3/test/qt.qdocconf
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Internally, QTextEngine use int to calculate most of the layout data
required. If a string longer than 2^24 is passed into either QTextEngine
or classes using it (QStackTextEngine, QPainter, QFontMetrics, etc.),
overflow will happen because the memory size required to allocate for
layout will become too large for int to handle. This patch will prevent
these cases and add error handling mechanism for relevant code.
Task-number: QT-3658
Reviewed-by: Eskil Abrahamsen Blomfeldt
|
|\ \
| |/
| |
| |
| | |
Conflicts:
src/gui/kernel/qapplication.h
|
| |
| |
| |
| |
| |
| | |
The QPaintBuffer gets the text from the text item in order to stream it.
Reviewed-by: Jocelyn Turcotte
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When laying out text, a significant amount of time was being spent
querying for the font engine. This patch:
* changes the layout to only query for the engine when a new script item
is encountered.
* adds an internal cache of the previous result to
QTextEngine::fontEngine(). This catches the important case of multiline
text with few font engine changes.
With these changes layout costs are now approximately 60% of what they
were previously, as measured by the text layout benchmarks.
Reviewed-by: Eskil Abrahamsen Blomfeldt
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
bin/syncqt
src/gui/text/qtextlayout.cpp
tools/assistant/tools/assistant/helpviewer_qwv.cpp
tools/assistant/tools/assistant/helpviewer_qwv.h
tools/configure/configureapp.cpp
|
| |
| |
| |
| | |
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure we use the same method to determine RTL/LTR
for the layout everywhere.
Task-number: Part of QT-3292
Reviewed-by: Simon Hausmann
|
| |
| |
| |
| |
| |
| |
| | |
If the text options doesn't specify the layout
direction, determine it from the content.
Reviewed-by: Simon Hausmann
|
| |
| |
| |
| |
| | |
Merge-request: 685
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
|
|\ \
| |/
| |
| |
| | |
Conflicts:
tools/qdoc3/test/qt-html-templates.qdocconf
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows quick layouting especially with Windows fonts which
contain heavy OpenType logic.
On regular latin text the visual compromize is the loss of kerning,
justification, capitalization, word spacing and letter spacing support.
Reviewed-by: Simon Hausmann
Reviewed-by: Eskil
|
| |
| |
| |
| | |
Reviewed-by: Simon Hausmann
|
|/
|
|
|
| |
Task: http://bugreports.qt.nokia.com/browse/QTBUG-231
Reviwed-by: Eskil
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/3rdparty/webkit/VERSION
src/3rdparty/webkit/WebCore/ChangeLog
src/3rdparty/webkit/WebCore/page/FrameView.cpp
src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp
src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def
src/s60installs/bwins/QtCoreu.def
src/s60installs/bwins/QtGuiu.def
src/s60installs/bwins/QtNetworku.def
src/s60installs/eabi/QtGuiu.def
tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
RVCT 4 is far more strict with regards to symbol visiblity that RVCT
2.2, and will hide symbols unless all references have default visibility
in the object files. Update the various places in Qt code where the
symbol visibility was set incorrectly for DLL-based platforms (those that
use __declspec(dllimport) and (dllexport).
Note: QtWebkit and QtScript are fixed in different commits.
Task-number: QTBUG-9903
Reviewed-by: Jason Barron
|
|\ \
| |/
| |
| |
| | |
Conflicts:
src/multimedia/audio/qaudioinput_win32_p.h
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The logClusters pointer is already adjusted for the item, so it should
be indexed relative to the item, hence from 0 to itemLength-1. Adding
pos to the index would give us a random value for all script items > 0.
Thus this would sometimes crash for text that spanned several scripts,
since we would sometimes get a value back which was outside the bounds
of the glyph array.
Task-number: QTBUG-9374
Reviewed-by: Samuel
|
| |
| |
| |
| |
| |
| |
| |
| | |
Calling QString::utf16() will cause reallocation (for null-termination)
if the string was created via fromRawData().
Reviewed-by: Benjamin Poulain
Reviewed-by: Simon Hausmann
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Four-way merge: take the qt-qml.git#4.7 branch version (which uses
fromUtf8). I used QLatin1String, Thierry used QString::fromLatin1.
Conflicts:
src/declarative/qml/qdeclarativecompiler.cpp
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| | |
Default-constructing the QFont member of QTextEngine meant getting the
QApplication::font() which is a waste of time.
Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
|
| |
| |
| |
| | |
Reviewed-by: Simon Hausmann
|
|/
|
|
|
|
|
| |
Calling QString::utf16() will cause reallocation (for null-termination)
if the string was created via fromRawData().
Reviewed-by: Benjamin Poulain
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|