aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/bitmapcopy.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2014-06-23 11:25:00 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-06-23 11:25:00 -0700
commit5fb6bd4b7e8d00b7f2543ca10ec9022b32632f29 (patch)
tree9212da1f0a1c6bee32c3debd4b8fd1ff61beca60 /gm/bitmapcopy.cpp
parentc83780c9ec9fb7dc46abed71a64d83ec0ce7a274 (diff)
use platform-independent font for gm
Create a custom typeface and scaler to render simple paths the same on all platforms. GM tests are modified to explicitly select the custom typeface. R=reed@google.com, mtklein@google.com, bungeman@google.com TBR=reed Author: caryclark@google.com Review URL: https://codereview.chromium.org/348323003
Diffstat (limited to 'gm/bitmapcopy.cpp')
-rw-r--r--gm/bitmapcopy.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/gm/bitmapcopy.cpp b/gm/bitmapcopy.cpp
index eaad8d0114..74505d911d 100644
--- a/gm/bitmapcopy.cpp
+++ b/gm/bitmapcopy.cpp
@@ -77,6 +77,8 @@ protected:
canvas->clear(0xFFDDDDDD);
paint.setAntiAlias(true);
+ sk_tool_utils::set_portable_typeface(&paint);
+
SkScalar width = SkIntToScalar(40);
SkScalar height = SkIntToScalar(40);
if (paint.getFontSpacing() > height) {