Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: Source/platform/fonts/mac/SimpleFontDataMac.mm

Issue 182923003: Chrome not considering Underline Position from Font (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing TestExpectation Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/fonts/FontMetrics.h ('k') | Source/platform/fonts/skia/SimpleFontDataSkia.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/mac/SimpleFontDataMac.mm
diff --git a/Source/platform/fonts/mac/SimpleFontDataMac.mm b/Source/platform/fonts/mac/SimpleFontDataMac.mm
index c8e44219c9c059ffbf3dc2f7e70957d0fcce4406..4150244a74dfaf23d1f6facdf0205ee8165aa012 100644
--- a/Source/platform/fonts/mac/SimpleFontDataMac.mm
+++ b/Source/platform/fonts/mac/SimpleFontDataMac.mm
@@ -213,6 +213,7 @@ void SimpleFontData::platformInit()
float descent = -scaleEmToUnits(iDescent, unitsPerEm) * pointSize;
float lineGap = scaleEmToUnits(iLineGap, unitsPerEm) * pointSize;
float underlineThickness = CTFontGetUnderlineThickness(m_platformData.ctFont());
+ float underlinePosition = CTFontGetUnderlinePosition(m_platformData.ctFont());
// We need to adjust Times, Helvetica, and Courier to closely match the
// vertical metrics of their Microsoft counterparts that are the de facto
@@ -256,6 +257,7 @@ void SimpleFontData::platformInit()
m_fontMetrics.setLineGap(lineGap);
m_fontMetrics.setXHeight(xHeight);
m_fontMetrics.setUnderlineThickness(underlineThickness);
+ m_fontMetrics.setUnderlinePosition(underlinePosition);
}
static CFDataRef copyFontTableForTag(FontPlatformData& platformData, FourCharCode tableName)
« no previous file with comments | « Source/platform/fonts/FontMetrics.h ('k') | Source/platform/fonts/skia/SimpleFontDataSkia.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698