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:
parent
4ed75287ae
commit
a3530ef268
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user