summaryrefslogtreecommitdiff
path: root/vcl/quartz/ctfonts.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/quartz/ctfonts.cxx')
-rw-r--r--vcl/quartz/ctfonts.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index 20fba1f90f21..c1116131403a 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -167,7 +167,11 @@ bool CoreTextStyle::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect )
SAL_WNODEPRECATED_DECLARATIONS_PUSH //TODO: 10.11 kCTFontDefaultOrientation
const CTFontOrientation aFontOrientation = kCTFontDefaultOrientation; // TODO: horz/vert
SAL_WNODEPRECATED_DECLARATIONS_POP
- const CGRect aCGRect = CTFontGetBoundingRectsForGlyphs( aCTFontRef, aFontOrientation, &nCGGlyph, nullptr, 1 );
+ CGRect aCGRect = CTFontGetBoundingRectsForGlyphs(aCTFontRef, aFontOrientation, &nCGGlyph, nullptr, 1);
+
+ // Apply font rotation to non-upright glyphs.
+ if (mfFontRotation && !(aGlyphId & GF_ROTMASK))
+ aCGRect = CGRectApplyAffineTransform(aCGRect, CGAffineTransformMakeRotation(mfFontRotation));
rRect.Left() = lrint( aCGRect.origin.x );
rRect.Top() = lrint(-aCGRect.origin.y );