summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine_mac.mm
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-10-26 16:09:30 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-10-26 16:12:39 +0100
commitf6480ca465af9617956752e60d9be3a19b710e0f (patch)
tree1ad08c6e9ecb5fc355734756aee1b5e2901840ad /src/gui/text/qfontengine_mac.mm
parent085a994122afc05b0e94c1d035cfcd6d82bdf136 (diff)
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
Diffstat (limited to 'src/gui/text/qfontengine_mac.mm')
-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 8ce437d4df..a4e7c04568 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) {