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

Unified Diff: Source/platform/fonts/skia/SimpleFontDataSkia.cpp

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/mac/SimpleFontDataMac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/skia/SimpleFontDataSkia.cpp
diff --git a/Source/platform/fonts/skia/SimpleFontDataSkia.cpp b/Source/platform/fonts/skia/SimpleFontDataSkia.cpp
index 21210b1a54d816a666bccc7f5f202be158abbe88..e312531f4b8e091857fc5851d74779f086d8e51c 100644
--- a/Source/platform/fonts/skia/SimpleFontDataSkia.cpp
+++ b/Source/platform/fonts/skia/SimpleFontDataSkia.cpp
@@ -129,11 +129,11 @@ void SimpleFontData::platformInit()
m_fontMetrics.setLineGap(lineGap);
m_fontMetrics.setLineSpacing(lroundf(ascent) + lroundf(descent) + lroundf(lineGap));
- // For now Skia does not support underline Thickness, once patch is comitted we can uncomment following
- // code, till then setting Underline Thickness to Zero so that default calculation is done.
- // float underlineThickness = SkScalarToFloat(metrics.fUnderlineThickness);
- // m_fontMetrics.setUnderlineThickness(underlineThickness);
- m_fontMetrics.setUnderlineThickness(0.f);
+ float underlineThickness = SkScalarToFloat(metrics.fUnderlineThickness);
+ m_fontMetrics.setUnderlineThickness(underlineThickness);
+
+ float underlinePosition = SkScalarToFloat(metrics.fUnderlinePosition);
+ m_fontMetrics.setUnderlineThickness(underlinePosition);
if (platformData().orientation() == Vertical && !isTextOrientationFallback()) {
static const uint32_t vheaTag = SkSetFourByteTag('v', 'h', 'e', 'a');
« no previous file with comments | « Source/platform/fonts/mac/SimpleFontDataMac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698