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: I0f545175bf2d5f4e8db610b26c2f3e21a89eeb2a
Reviewed-on: https://skia-review.googlesource.com/10751
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
This commit is contained in:
Ben Wagner 2017-03-30 10:19:24 -04:00 committed by Skia Commit-Bot
parent 77f1edce07
commit b1f76531f6

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(fTextSizeRender), &range);
get_gasp_range(typeface, SkScalarTruncToInt(gdiTextSize), &range);
fRenderingMode = gasp_allows_cleartype_symmetric(range.fFlags)
? DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
: DWRITE_RENDERING_MODE_NATURAL;