Commit e3a8868d authored by eae@chromium.org's avatar eae@chromium.org

Reland "Go back to old underline position and thickness logic"

In r174431 from May this year we changed the underline position and
thickness logic to respect the underline data specified in the font.
While this improved rendering for certain fonts and scripts it did cause
a regression for others. This change reverts to the old behavior while
we figure out how to handle fonts with inaccurate or undesirable
metrics.

BUG=408075
TBR=keishi@chromium.org

Committed as r181591 and reverted in r181607 due to missing XP
expectations.

Review URL: https://codereview.chromium.org/555883002

git-svn-id: svn://svn.chromium.org/blink/trunk@181659 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent f99e9de9
...@@ -131,13 +131,6 @@ void SimpleFontData::platformInit() ...@@ -131,13 +131,6 @@ void SimpleFontData::platformInit()
m_fontMetrics.setLineGap(lineGap); m_fontMetrics.setLineGap(lineGap);
m_fontMetrics.setLineSpacing(lroundf(ascent) + lroundf(descent) + lroundf(lineGap)); m_fontMetrics.setLineSpacing(lroundf(ascent) + lroundf(descent) + lroundf(lineGap));
SkScalar underlineThickness, underlinePosition;
if (metrics.hasUnderlineThickness(&underlineThickness)
&& metrics.hasUnderlinePosition(&underlinePosition)) {
m_fontMetrics.setUnderlineThickness(SkScalarToFloat(underlineThickness));
m_fontMetrics.setUnderlinePosition(SkScalarToFloat(-underlinePosition));
}
if (platformData().orientation() == Vertical && !isTextOrientationFallback()) { if (platformData().orientation() == Vertical && !isTextOrientationFallback()) {
static const uint32_t vheaTag = SkSetFourByteTag('v', 'h', 'e', 'a'); static const uint32_t vheaTag = SkSetFourByteTag('v', 'h', 'e', 'a');
static const uint32_t vorgTag = SkSetFourByteTag('V', 'O', 'R', 'G'); static const uint32_t vorgTag = SkSetFourByteTag('V', 'O', 'R', 'G');
......
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