From 3a96d8ead86dc210085f09076fd270f247442f0a Mon Sep 17 00:00:00 2001 From: Thorsten Wagner Date: Fri, 24 Apr 2015 00:11:41 +0200 Subject: tdf#90822: Descenders cropped Change-Id: I0985fb290c18630aab2d33a5ac59e32a172e7630 Reviewed-on: https://gerrit.libreoffice.org/15502 Tested-by: Jenkins Reviewed-by: Norbert Thiebaud --- vcl/quartz/ctfonts.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vcl') diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx index 584ceaa4a6be..02db1af97fbb 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -123,10 +123,10 @@ void CoreTextStyle::GetFontMetric( ImplFontMetricData& rMetric ) const const CGFloat fAscent = CTFontGetAscent( aCTFontRef ); const CGFloat fCapHeight = CTFontGetCapHeight( aCTFontRef ); - rMetric.mnAscent = fAscent; - rMetric.mnDescent = CTFontGetDescent( aCTFontRef ); - rMetric.mnExtLeading = CTFontGetLeading( aCTFontRef ); - rMetric.mnIntLeading = fAscent - fCapHeight; + rMetric.mnAscent = lrint( fAscent ); + rMetric.mnDescent = lrint( CTFontGetDescent( aCTFontRef )); + rMetric.mnExtLeading = lrint( CTFontGetLeading( aCTFontRef )); + rMetric.mnIntLeading = lrint( fAscent - fCapHeight ); // since ImplFontMetricData::mnWidth is only used for stretching/squeezing fonts // setting this width to the pixel height of the fontsize is good enough -- cgit