Bug 1074735 pt 1 - Use more sensible values for underline and strikeout position in vertical font metrics. r=smontagu

This commit is contained in:
Jonathan Kew 2014-10-08 10:32:53 +01:00
Родитель 860cd0a2e6
Коммит c765f6c3f8
1 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -3431,11 +3431,10 @@ gfxFont::CreateVerticalMetrics()
// We synthesize our own positions, as font metrics don't provide these
// for vertical layout.
metrics->underlineSize = std::max(1.0, metrics->underlineSize);
metrics->underlineOffset = 0; // XXX to be adjusted
metrics->underlineOffset = - metrics->maxDescent - metrics->underlineSize;
metrics->strikeoutSize = std::max(1.0, metrics->strikeoutSize);
metrics->strikeoutOffset =
metrics->maxDescent - 0.5 * metrics->strikeoutSize;
metrics->strikeoutOffset = - 0.5 * metrics->strikeoutSize;
// Somewhat arbitrary values for now, subject to future refinement...
metrics->spaceWidth = metrics->aveCharWidth;