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

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 Comments Created 6 years, 10 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
Index: Source/platform/fonts/mac/SimpleFontDataMac.mm
diff --git a/Source/platform/fonts/mac/SimpleFontDataMac.mm b/Source/platform/fonts/mac/SimpleFontDataMac.mm
index fda2fa0bae91f2a281470c3d7fdba97b547d9a34..b402402f1b5d03a70ee8dfc9d58c794bf2ff8609 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)

Powered by Google App Engine
This is Rietveld 408576698