[Libreoffice-commits] core.git: 2 commits - vcl/coretext
Khaled Hosny
khaledhosny at eglug.org
Thu May 9 14:51:35 PDT 2013
vcl/coretext/salgdi.cxx | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
New commits:
commit 543ac5596d0ef3a052973c1ec89a9329d1073dc8
Author: Khaled Hosny <khaledhosny at eglug.org>
Date: Thu May 9 23:49:45 2013 +0200
Minor
Change-Id: I31b95844234135d14f117ae74124350eedf7d20a
diff --git a/vcl/coretext/salgdi.cxx b/vcl/coretext/salgdi.cxx
index 227a5c4..58e850d 100644
--- a/vcl/coretext/salgdi.cxx
+++ b/vcl/coretext/salgdi.cxx
@@ -149,10 +149,10 @@ void QuartzSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbac
CTFontRef font = m_style->GetFont();
DBG_ASSERT(font, "GetFontMetric without font set in style");
- pMetric->mnAscent = static_cast<long>( CTFontGetAscent(font) * mfFakeDPIScale + 0.5);
+ pMetric->mnAscent = static_cast<long>(CTFontGetAscent(font) * mfFakeDPIScale + 0.5);
pMetric->mnDescent = static_cast<long>(CTFontGetDescent(font) * mfFakeDPIScale + 0.5);
pMetric->mnExtLeading = static_cast<long>(CTFontGetLeading(font) * mfFakeDPIScale + 0.5);
- pMetric->mnIntLeading = 0;
+ pMetric->mnIntLeading = 0;
pMetric->mnWidth = m_style->GetFontStretchedSize();
SAL_INFO( "vcl.coretext.gr",
commit 924aeb3d039f4ce554b795532e6948fa9065010b
Author: Khaled Hosny <khaledhosny at eglug.org>
Date: Thu May 9 23:24:17 2013 +0200
[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
diff --git a/vcl/coretext/salgdi.cxx b/vcl/coretext/salgdi.cxx
index a462c37..227a5c4 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();
More information about the Libreoffice-commits
mailing list