Kaydet (Commit) 924aeb3d authored tarafından Khaled Hosny's avatar Khaled Hosny

[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
üst e68205f2
...@@ -151,9 +151,7 @@ void QuartzSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbac ...@@ -151,9 +151,7 @@ void QuartzSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbac
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->mnDescent = static_cast<long>(CTFontGetDescent(font) * mfFakeDPIScale + 0.5);
const long nExtDescent = static_cast<long>((CTFontGetLeading(font) + CTFontGetDescent(font)) * pMetric->mnExtLeading = static_cast<long>(CTFontGetLeading(font) * mfFakeDPIScale + 0.5);
mfFakeDPIScale + 0.5);
pMetric->mnExtLeading = nExtDescent + pMetric->mnDescent;
pMetric->mnIntLeading = 0; pMetric->mnIntLeading = 0;
pMetric->mnWidth = m_style->GetFontStretchedSize(); pMetric->mnWidth = m_style->GetFontStretchedSize();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment