From ea0765224a595ed42a9ad713a87db16b4211e5f0 Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Wed, 5 Apr 2017 11:40:41 -0400 Subject: 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 Commit-Queue: Ben Wagner --- src/ports/SkScalerContext_win_dw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ports/SkScalerContext_win_dw.cpp b/src/ports/SkScalerContext_win_dw.cpp index a4f08e89c0..81238a6088 100644 --- a/src/ports/SkScalerContext_win_dw.cpp +++ b/src/ports/SkScalerContext_win_dw.cpp @@ -330,7 +330,7 @@ SkScalerContext_DW::SkScalerContext_DW(sk_sp 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; -- cgit v1.2.3