summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-10-26 15:09:30 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-10-26 15:12:39 (GMT)
commitf6480ca465af9617956752e60d9be3a19b710e0f (patch)
tree1ad08c6e9ecb5fc355734756aee1b5e2901840ad
parent085a994122afc05b0e94c1d035cfcd6d82bdf136 (diff)
downloadQt-f6480ca465af9617956752e60d9be3a19b710e0f.zip
Qt-f6480ca465af9617956752e60d9be3a19b710e0f.tar.gz
Qt-f6480ca465af9617956752e60d9be3a19b710e0f.tar.bz2
Cocoa: Synthesize italic text correct way when adding glyphs to path
On Mac OS X, Cocoa, we would synthesize italics on the text by slanting it in the incorrect direction (so it leaned to the left) when generating a path from the text, e.g. when printing. The patch makes the text slant the correct way, and the logic now becomes identical with the synthesized italics in the draw() function. Task-number: QTBUG-4969 Reviewed-by: Trond
-rw-r--r--src/gui/text/qfontengine_mac.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm
index 8ce437d..a4e7c04 100644
--- a/src/gui/text/qfontengine_mac.mm
+++ b/src/gui/text/qfontengine_mac.mm
@@ -546,7 +546,7 @@ void QCoreTextFontEngine::addGlyphsToPath(glyph_t *glyphs, QFixedPoint *position
cgMatrix = CGAffineTransformScale(cgMatrix, 1, -1);
if (synthesisFlags & QFontEngine::SynthesizedItalic)
- cgMatrix = CGAffineTransformConcat(cgMatrix, CGAffineTransformMake(1, 0, tanf(14 * acosf(0) / 90), 1, 0, 0));
+ cgMatrix = CGAffineTransformConcat(cgMatrix, CGAffineTransformMake(1, 0, -tanf(14 * acosf(0) / 90), 1, 0, 0));
for (int i = 0; i < nGlyphs; ++i) {