[Libreoffice-commits] core.git: vcl/quartz
Thorsten Wagner
thorsten.wagner.4 at gmail.com
Sat Apr 25 18:59:20 PDT 2015
vcl/quartz/ctfonts.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 3a96d8ead86dc210085f09076fd270f247442f0a
Author: Thorsten Wagner <thorsten.wagner.4 at gmail.com>
Date: Fri Apr 24 00:11:41 2015 +0200
tdf#90822: Descenders cropped
Change-Id: I0985fb290c18630aab2d33a5ac59e32a172e7630
Reviewed-on: https://gerrit.libreoffice.org/15502
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index 584ceaa..02db1af 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
More information about the Libreoffice-commits
mailing list