Go to file
Eskil Abrahamsen Blomfeldt 0fc1e852ae Fix transformations on DirectWrite rasterized text
There were a few bugs in the DirectWrite font engine that caused
transformed text to break.

First of all, alphaMapForGlyph() ignored the transform, so no gray
antialiased text would be transformed.

Second of all, the imageForGlyph() function would use the wrong
bounding box for the rasterized glyph, causing its positioning to
become a little bit off when rotating. The fix is to get the bounding
box from the system and add a margin to this instead of trying to predict
how it will appear after the vertical hinting etc. has been applied.

So that the positioning metrics are in sync with the actual metrics used
by the alphaMap* functions, we also need to implement the
alphaMapBoundingBox() function.

Task-number: QTBUG-19829
Reviewed-by: Jiang Jiang
(cherry picked from commit f54c5d9133d7aa7636988db36fa6cc51d26434b6)

Change-Id: I3c3840b41e19fcacf926dbf454bdc2cba4bd5a99
Reviewed-on: http://codereview.qt.nokia.com/948
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-07-01 07:17:15 +02:00
bin Implemented module-local caching of module profiles. 2011-06-03 22:20:40 +02:00
config.profiles Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
config.tests Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
dist Remove QPainter::UniteClip 2011-06-28 16:52:44 +02:00
doc/src Move the chip example in the docs. 2011-06-29 13:44:13 +02:00
examples Add the richtext and tools demo-examples to build. 2011-06-28 14:20:51 +02:00
lib Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
mkspecs Build Qt with option -Zc:wchar_t under MSVC 2011-06-27 19:09:33 +02:00
qmake Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
src Fix transformations on DirectWrite rasterized text 2011-07-01 07:17:15 +02:00
tests Fix text color in some cases of QML and QStaticText 2011-06-30 15:03:28 +02:00
tools Remove all references to demos. 2011-06-23 14:03:31 +02:00
util Make lexgen tests compile 2011-05-27 08:41:02 +02:00
.gitattributes Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
.gitignore Add QT_xxx_VERSION macros for each library in qtbase 2011-05-10 15:15:15 +02:00
.tag Added .tag file with Git revision. 2011-05-03 16:23:49 +02:00
configure Turn off Qt3 support by default 2011-06-29 12:27:19 +02:00
configure.exe New configure.exe binary 2011-05-23 09:24:19 -05:00
header.BSD Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
header.FDL Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
header.LGPL Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
header.LGPL-ONLY Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
INSTALL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LGPL_EXCEPTION.txt Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.LGPL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.PREVIEW.COMMERCIAL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
qtbase.pro Remove all references to demos. 2011-06-23 14:03:31 +02:00
sync.profile Add QT_xxx_VERSION macros for each library in qtbase 2011-05-10 15:15:15 +02:00