summaryrefslogtreecommitdiff
path: root/vcl/quartz
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2016-11-02 23:38:13 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2016-11-02 23:50:36 +0200
commit8cef9b4dbafdebc0566d6d7f715f27f978ddfe5b (patch)
tree749a39666851d472c4d0099c9ecdbaf5e993a6a6 /vcl/quartz
parent6f82a540c505fca37292f4b5cb74a1441a25ca98 (diff)
Fix GetGlyphBoundRect() on macOS
The Y sign should be reversed to match VCL, apparently it was either unused on macOS before CommonSalLayout or it was wrong all along. This was the source of CppunitTest_svgio failure on macOS with CommonSalLayout. Change-Id: I3108aab7b6780c912e86e5591ca0f41ea437137b
Diffstat (limited to 'vcl/quartz')
-rw-r--r--vcl/quartz/ctfonts.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index 948bfb5141c6..11905c24d8e7 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -157,9 +157,9 @@ bool CoreTextStyle::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect )
const CGRect aCGRect = CTFontGetBoundingRectsForGlyphs( aCTFontRef, aFontOrientation, &nCGGlyph, nullptr, 1 );
rRect.Left() = lrint( aCGRect.origin.x );
- rRect.Top() = lrint( aCGRect.origin.y );
+ rRect.Top() = lrint(-aCGRect.origin.y );
rRect.Right() = lrint( aCGRect.origin.x + aCGRect.size.width );
- rRect.Bottom() = lrint( aCGRect.origin.y + aCGRect.size.height );
+ rRect.Bottom() = lrint( aCGRect.origin.y - aCGRect.size.height );
return true;
}