aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2017-04-05 11:40:41 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-05 17:28:48 +0000
commitea0765224a595ed42a9ad713a87db16b4211e5f0 (patch)
treef492056bf661bf27a5a1abb8e8429def15d6a8c7
parent4ebb43e94f39be5da8fc04fc0be8a63726bacffb (diff)
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>
-rw-r--r--src/ports/SkScalerContext_win_dw.cpp2
1 files changed, 1 insertions, 1 deletions
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<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;