From 9564ce60a657acce89fb956deb8645b324eaad1e Mon Sep 17 00:00:00 2001 From: jvanverth Date: Tue, 16 Sep 2014 05:45:19 -0700 Subject: Fix scaling issue with distance field text. Picks the correct distance field size based on both the text size and the max matrix scale. Adjusts the matrix scale if non-unity. Also adds GM for verifying proper distance field scaling. BUG=skia:2928 R=bsalomon@google.com, joshualitt@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/568843002 --- gm/fontscaler.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'gm/fontscaler.cpp') diff --git a/gm/fontscaler.cpp b/gm/fontscaler.cpp index 8aef8f0ebe..eb38013cb1 100644 --- a/gm/fontscaler.cpp +++ b/gm/fontscaler.cpp @@ -72,12 +72,10 @@ protected: canvas->drawRect(r, p); } - int index = 0; for (int ps = 6; ps <= 22; ps++) { paint.setTextSize(SkIntToScalar(ps)); canvas->drawText(text, textLen, x, y, paint); y += paint.getFontMetrics(NULL); - index += 1; } } canvas->translate(0, SkIntToScalar(360)); -- cgit v1.2.3