diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-23 16:46:31 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-23 16:46:31 (GMT) |
commit | 05402ac27bd669c371e4ba08763ba45d6b31edc4 (patch) | |
tree | 0bbec8bbb858a8764b1f9dcb2aea8d025b4f2fa8 /src/gui/text | |
parent | 0d02bf894a1f3f494a4787ddfaf0e3bcd02affa2 (diff) | |
parent | 541ca25dc71545e1b55ad31cffe7df4b49214a48 (diff) | |
download | Qt-05402ac27bd669c371e4ba08763ba45d6b31edc4.zip Qt-05402ac27bd669c371e4ba08763ba45d6b31edc4.tar.gz Qt-05402ac27bd669c371e4ba08763ba45d6b31edc4.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (33 commits)
Skip complex FBO tests if combined depth-stencil isn't supported
Make tst_QGL::glWidgetRendering use same test as FBO autotest
Updated WebKit from /home/jturcott/dev/webkit to qtwebkit-4.7-merged ( 9303f6d67fb964b71ed3e7361367c3ccfaba5e0a )
Updated WebKit from /home/jturcott/dev/webkit to qtwebkit-4.7-merged ( 5381ceeb37d97365cfb2f037650dbb4e495bca4e )
Adjust the mkdist-webkit script before the importation of WebKit.
Make mediaservices use existing GStreamer qmake vars
Detect GStreamer even when we're not building phonon
Fix build on systems without XVideo headers
Make the XVideo configure test actually pass if XV is present
Add a configure test for XVideo support
Fixed cosmetic glitch in QTabBar label's rendering
improve sql support for mingw64
improve 64 bit support on windows
Made the qDrawPixmaps() API public (with modifications).
Fix GL viewports under -graphicssystem raster.
QSortFilterProxyModel: Sorting occured unnecessarily when the dynamicSortFilter is turned off
Fix test with gcc 4.0 where QT_USE_FAST_CONCATENATION cannot be enabled.
Fix build with wingw
Imporve win64 support for mingw
Compile
...
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qfontengine.cpp | 10 | ||||
-rw-r--r-- | src/gui/text/qfontengine_win.cpp | 6 | ||||
-rw-r--r-- | src/gui/text/qstatictext.cpp | 2 |
3 files changed, 11 insertions, 7 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index c000457..e5975d2 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -587,8 +587,9 @@ QImage QFontEngine::alphaMapForGlyph(glyph_t glyph, const QTransform &t) { QImage i = alphaMapForGlyph(glyph); if (t.type() > QTransform::TxTranslate) - i = i.transformed(t); + i = i.transformed(t).convertToFormat(QImage::Format_Indexed8); Q_ASSERT(i.depth() <= 8); // To verify that transformed didn't change the format... + return i; } @@ -597,11 +598,14 @@ QImage QFontEngine::alphaRGBMapForGlyph(glyph_t glyph, int /* margin */, const Q QImage alphaMask = alphaMapForGlyph(glyph, t); QImage rgbMask(alphaMask.width(), alphaMask.height(), QImage::Format_RGB32); + QVector<QRgb> colorTable = alphaMask.colorTable(); for (int y=0; y<alphaMask.height(); ++y) { uint *dst = (uint *) rgbMask.scanLine(y); uchar *src = (uchar *) alphaMask.scanLine(y); - for (int x=0; x<alphaMask.width(); ++x) - dst[x] = qRgb(src[x], src[x], src[x]); + for (int x=0; x<alphaMask.width(); ++x) { + int val = qAlpha(colorTable.at(src[x])); + dst[x] = qRgb(val, val, val); + } } return rgbMask; diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp index 1a815d3..55e93bd 100644 --- a/src/gui/text/qfontengine_win.cpp +++ b/src/gui/text/qfontengine_win.cpp @@ -208,7 +208,7 @@ void QFontEngineWin::getCMap() unitsPerEm = otm->otmEMSquare; x_height = (int)otm->otmsXHeight; loadKerningPairs(designToDevice); - _faceId.filename = QString::fromWCharArray((wchar_t *)((char *)otm + (int)otm->otmpFullName)).toLatin1(); + _faceId.filename = QString::fromWCharArray((wchar_t *)((char *)otm + (quintptr)otm->otmpFullName)).toLatin1(); lineWidth = otm->otmsUnderscoreSize; fsType = otm->otmfsType; free(otm); @@ -1006,8 +1006,8 @@ QFontEngine::Properties QFontEngineWin::properties() const Properties p; p.emSquare = unitsPerEm; p.italicAngle = otm->otmItalicAngle; - p.postscriptName = QString::fromWCharArray((wchar_t *)((char *)otm + (int)otm->otmpFamilyName)).toLatin1(); - p.postscriptName += QString::fromWCharArray((wchar_t *)((char *)otm + (int)otm->otmpStyleName)).toLatin1(); + p.postscriptName = QString::fromWCharArray((wchar_t *)((char *)otm + (quintptr)otm->otmpFamilyName)).toLatin1(); + p.postscriptName += QString::fromWCharArray((wchar_t *)((char *)otm + (quintptr)otm->otmpStyleName)).toLatin1(); #ifndef QT_NO_PRINTER p.postscriptName = QPdf::stripSpecialCharacters(p.postscriptName); #endif diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp index a7138b9..952d998 100644 --- a/src/gui/text/qstatictext.cpp +++ b/src/gui/text/qstatictext.cpp @@ -356,7 +356,7 @@ QStaticTextPrivate::QStaticTextPrivate() QStaticTextPrivate::QStaticTextPrivate(const QStaticTextPrivate &other) : text(other.text), font(other.font), maximumSize(other.maximumSize), matrix(other.matrix), items(0), itemCount(0), glyphPool(0), positionPool(0), needsClipRect(false), - useBackendOptimizations(false), textFormat(other.textFormat) + useBackendOptimizations(other.useBackendOptimizations), textFormat(other.textFormat) { ref = 1; } |