diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-10-09 17:37:11 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-10-11 20:56:43 +0200 |
commit | a0f145baab0080b335fa0a5be44472a3acda34e0 (patch) | |
tree | 8078066c0a0576d59ee416494ec3c5b991cd4070 /src/platformsupport/fontdatabases/mac | |
parent | afb82ef5be71382df0fbc5ef3bd4d5ed41ed79e9 (diff) |
Fix vertical advance for printing on macOS
The Y coordinate needed to be reversed to produce expected results.
Fixes: QTBUG-69803
Change-Id: If349912cd078d17ce69d207c2ed35cf781c1a14d
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src/platformsupport/fontdatabases/mac')
-rw-r--r-- | src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm index 072dd1a28a..30c80ebd86 100644 --- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm +++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm @@ -471,7 +471,7 @@ void QCoreTextFontEngine::draw(CGContextRef ctx, qreal x, qreal y, const QTextIt const qreal firstY = positions[0].y.toReal(); for (int i = 0; i < glyphs.size(); ++i) { cgPositions[i].x = positions[i].x.toReal() - firstX; - cgPositions[i].y = positions[i].y.toReal() - firstY; + cgPositions[i].y = firstY - positions[i].y.toReal(); cgGlyphs[i] = glyphs[i]; } |