diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-10 01:49:02 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-10 01:49:02 (GMT) |
commit | 7690bab57ef7ae6d669c6df23e9de72fd8a85d62 (patch) | |
tree | 3015d651d56e78e20862a20353a6a8261b718563 /src/gui/text | |
parent | 19a566f82a7c684423331a8caab70ec594afd1ce (diff) | |
parent | 501a80b1dc9df816a3de25bd1af5b55cdc0fcbce (diff) | |
download | Qt-7690bab57ef7ae6d669c6df23e9de72fd8a85d62.zip Qt-7690bab57ef7ae6d669c6df23e9de72fd8a85d62.tar.gz Qt-7690bab57ef7ae6d669c6df23e9de72fd8a85d62.tar.bz2 |
Merge branch 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into 4.7-integration
* 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: (26 commits)
Regressions in Global Object prototype access
Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 14feb62c96ffe2c37e3e2fdac4e370fdbc76ef62 )
Autotest: fix paths on the test server after update.
Fix typo in docs.
Corruption in data captured by QAudioInput
Just one (static) waveInCriticalSection but multiple QAudioInput to
Mismatch between reported and actual supported sample rates in
Remove qWait functions as it is used in QTRY_* macros.
Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( e3dc4ef2b801d91e115c54f833fa7766d392ceda )
Fix crash for multiscript text in QTextEngine::boundingBox()
Fixed modal dialog not to have automatic "Exit" right softkey in S60.
Remove qWait functions as it is used in QTRY_* macros.
QAudioInput: possible change of state without emitting stateChange()
Did not include updated repaint number for parent item in revert.
Implementing QFontEngineS60::getSfntTableData()
Fix doc for deprecated QGridLayout::colSpacing: point to existing method
qDebug() << myPointF would remove spaces in following arguments.
Fix crash in the fileiconprovider for Windows
Partially revert "Remove qWait functions as it is used in QTRY_* macros."
Remove qWait functions as it is used in QTRY_* macros.
...
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qfontengine_s60.cpp | 30 | ||||
-rw-r--r-- | src/gui/text/qfontengine_s60_p.h | 2 | ||||
-rw-r--r-- | src/gui/text/qtextengine.cpp | 2 |
3 files changed, 33 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp index 3ea084b..c9ff661 100644 --- a/src/gui/text/qfontengine_s60.cpp +++ b/src/gui/text/qfontengine_s60.cpp @@ -79,6 +79,31 @@ QByteArray QFontEngineS60Extensions::getSfntTable(uint tag) const return result; } +bool QFontEngineS60Extensions::getSfntTableData(uint tag, uchar *buffer, uint *length) const +{ + if (!m_trueTypeExtension->HasTrueTypeTable(tag)) + return false; + + bool result = true; + TInt error = KErrNone; + TInt tableByteLength; + TAny *table = + q_check_ptr(m_trueTypeExtension->GetTrueTypeTable(error, tag, &tableByteLength)); + + if (error != KErrNone) { + return false; + } else if (*length > 0 && *length < tableByteLength) { + result = false; // Caller did not allocate enough memory + } else { + *length = tableByteLength; + if (buffer) + qMemCopy(buffer, table, tableByteLength); + } + + m_trueTypeExtension->ReleaseTrueTypeTable(table); + return result; +} + const unsigned char *QFontEngineS60Extensions::cmap() const { if (!m_cmap) { @@ -326,6 +351,11 @@ QByteArray QFontEngineS60::getSfntTable(uint tag) const return m_extensions->getSfntTable(tag); } +bool QFontEngineS60::getSfntTableData(uint tag, uchar *buffer, uint *length) const +{ + return m_extensions->getSfntTableData(tag, buffer, length); +} + QFontEngine::Type QFontEngineS60::type() const { return QFontEngine::S60FontEngine; diff --git a/src/gui/text/qfontengine_s60_p.h b/src/gui/text/qfontengine_s60_p.h index 5834cc4..a80af4d 100644 --- a/src/gui/text/qfontengine_s60_p.h +++ b/src/gui/text/qfontengine_s60_p.h @@ -69,6 +69,7 @@ public: QFontEngineS60Extensions(CFont* fontOwner, COpenFont *font); QByteArray getSfntTable(uint tag) const; + bool getSfntTableData(uint tag, uchar *buffer, uint *length) const; const unsigned char *cmap() const; QPainterPath glyphOutline(glyph_t glyph) const; CFont *fontOwner() const; @@ -106,6 +107,7 @@ public: qreal minRightBearing() const { return 0; } QByteArray getSfntTable(uint tag) const; + bool getSfntTableData(uint tag, uchar *buffer, uint *length) const; static qreal pixelsToPoints(qreal pixels, Qt::Orientation orientation = Qt::Horizontal); static qreal pointsToPixels(qreal points, Qt::Orientation orientation = Qt::Horizontal); diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 7dc2c26..6485966 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1647,7 +1647,7 @@ glyph_metrics_t QTextEngine::boundingBox(int from, int len) const } } - glyph_t glyph = glyphs.glyphs[logClusters[pos + ilen - 1]]; + glyph_t glyph = glyphs.glyphs[logClusters[ilen - 1]]; glyph_metrics_t gi = fe->boundingBox(glyph); if (gi.isValid()) gm.width -= qRound(gi.xoff - gi.x - gi.width); |