Use the rounded text size for gasp.

When comparing against gasp ranges always use the rounded (gdi) size.
Previously the truncated size was used, but it appears other
implementations are using the rounded size.

BUG=chromium:706693

Change-Id: I185cdf5b905261038e5150a04eef1b99bf73d875
Reviewed-on: https://skia-review.googlesource.com/11354
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This commit is contained in:
Ben Wagner 2017-04-05 11:40:41 -04:00 committed by Skia Commit-Bot
parent 4ebb43e94f
commit ea0765224a

View File

@ -330,7 +330,7 @@ SkScalerContext_DW::SkScalerContext_DW(sk_sp<DWriteFontTypeface> typefaceRef,
} else {
fTextSizeRender = realTextSize;
GaspRange range(0, 0xFFFF, GaspRange::Behavior());
get_gasp_range(typeface, SkScalarTruncToInt(gdiTextSize), &range);
get_gasp_range(typeface, SkScalarRoundToInt(gdiTextSize), &range);
fRenderingMode = gasp_allows_cleartype_symmetric(range.fFlags)
? DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
: DWRITE_RENDERING_MODE_NATURAL;