summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/qa/cppunit/complextext.cxx3
-rw-r--r--vcl/quartz/ctfonts.cxx9
2 files changed, 5 insertions, 7 deletions
diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx
index 58c10803e4c6..1cb09e03c992 100644
--- a/vcl/qa/cppunit/complextext.cxx
+++ b/vcl/qa/cppunit/complextext.cxx
@@ -59,12 +59,9 @@ void VclComplexTextTest::testArabic()
CPPUNIT_ASSERT_EQUAL(13L, pOutDev->GetTextHeight());
// exact bounding rectangle, not essentially the same as text width/height
-#ifndef MACOSX
- // FIXME: fails on mac, probably different rounding strategy.
Rectangle aBoundRect;
pOutDev->GetTextBoundRect(aBoundRect, aOneTwoThree);
CPPUNIT_ASSERT_EQUAL(Rectangle(0, 1, 71, 15), aBoundRect);
-#endif
// normal orientation
Rectangle aInput;
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index b5db7e572226..42e1169a37aa 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -166,10 +166,11 @@ bool CoreTextStyle::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect
if (mfFontRotation && !rGlyph.IsVertical())
aCGRect = CGRectApplyAffineTransform(aCGRect, CGAffineTransformMakeRotation(mfFontRotation));
- rRect.Left() = lrint( aCGRect.origin.x );
- rRect.Top() = lrint(-aCGRect.origin.y - aCGRect.size.height );
- rRect.Right() = lrint( aCGRect.origin.x + aCGRect.size.width );
- rRect.Bottom() = lrint(-aCGRect.origin.y );
+ long xMin = floor(aCGRect.origin.x);
+ long yMin = floor(aCGRect.origin.y);
+ long xMax = ceil(aCGRect.origin.x + aCGRect.size.width);
+ long yMax = ceil(aCGRect.origin.y + aCGRect.size.height);
+ rRect = Rectangle(xMin, -yMax, xMax, -yMin);
return true;
}