DirectWrite to not round already subpixel metrics.

In keeping with the FreeType and Mac scaler contexts, do not artificially
round already subpixel metrics.

The subpixel flag should be the 'forceSubpixel' flag when it comes to
metrics. Existing backends will give subpixel metrics when 'subpixel' is
requested, but will not round proper metrics when 'subpixel' is not
requested.

R=reed@google.com

Author: bungeman@google.com

Review URL: https://codereview.chromium.org/344253002
This commit is contained in:
bungeman 2014-06-20 10:35:00 -07:00 коммит произвёл Commit bot
Родитель 4ed75287ae
Коммит a3530ef268
1 изменённых файлов: 0 добавлений и 4 удалений

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

@ -288,10 +288,6 @@ void SkScalerContext_DW::generateAdvance(SkGlyph* glyph) {
SkIntToScalar(gm.advanceWidth),
SkIntToScalar(dwfm.designUnitsPerEm));
if (!this->isSubpixel()) {
advanceX = SkScalarRoundToScalar(advanceX);
}
SkVector vecs[1] = { { advanceX, 0 } };
if (DWRITE_MEASURING_MODE_GDI_CLASSIC == fMeasuringMode ||
DWRITE_MEASURING_MODE_GDI_NATURAL == fMeasuringMode)