summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-05-09 23:24:17 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2013-05-09 23:48:59 +0200
commit924aeb3d039f4ce554b795532e6948fa9065010b (patch)
tree547a081b8e5de3b35dc3afe4ed2d1af4f5f0b8c6 /vcl
parente68205f2b8f995e080412579afc21384a6a09895 (diff)
[coretext] Fix line spacing
It should have been nExtDescent + pMetric->mnDescent, but then the whole thing does not make any sense; why add the descent to the leading and then calculate the leading by subtracting the descent! (well, the ATSUI code was doing this but it makes no sense either). Just use CTFontGetLeading() directly. Change-Id: Ia54648f6c02c11359865f4aa6476adf40b27f906
Diffstat (limited to 'vcl')
-rw-r--r--vcl/coretext/salgdi.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/vcl/coretext/salgdi.cxx b/vcl/coretext/salgdi.cxx
index a462c37cf64b..227a5c4ad3a8 100644
--- a/vcl/coretext/salgdi.cxx
+++ b/vcl/coretext/salgdi.cxx
@@ -151,9 +151,7 @@ void QuartzSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbac
pMetric->mnAscent = static_cast<long>( CTFontGetAscent(font) * mfFakeDPIScale + 0.5);
pMetric->mnDescent = static_cast<long>(CTFontGetDescent(font) * mfFakeDPIScale + 0.5);
- const long nExtDescent = static_cast<long>((CTFontGetLeading(font) + CTFontGetDescent(font)) *
- mfFakeDPIScale + 0.5);
- pMetric->mnExtLeading = nExtDescent + pMetric->mnDescent;
+ pMetric->mnExtLeading = static_cast<long>(CTFontGetLeading(font) * mfFakeDPIScale + 0.5);
pMetric->mnIntLeading = 0;
pMetric->mnWidth = m_style->GetFontStretchedSize();