From 5fb6bd4b7e8d00b7f2543ca10ec9022b32632f29 Mon Sep 17 00:00:00 2001 From: caryclark Date: Mon, 23 Jun 2014 11:25:00 -0700 Subject: 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 --- gm/cubicpaths.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gm/cubicpaths.cpp') diff --git a/gm/cubicpaths.cpp b/gm/cubicpaths.cpp index 39417010c1..68d143df60 100644 --- a/gm/cubicpaths.cpp +++ b/gm/cubicpaths.cpp @@ -130,6 +130,7 @@ protected: SkPaint titlePaint; titlePaint.setColor(SK_ColorBLACK); titlePaint.setAntiAlias(true); + sk_tool_utils::set_portable_typeface(&titlePaint); titlePaint.setLCDRenderText(true); titlePaint.setTextSize(15 * SK_Scalar1); const char title[] = "Cubic Drawn Into Rectangle Clips With " @@ -174,6 +175,7 @@ protected: SkPaint labelPaint; labelPaint.setColor(color); labelPaint.setAntiAlias(true); + sk_tool_utils::set_portable_typeface(&labelPaint); labelPaint.setLCDRenderText(true); labelPaint.setTextSize(10 * SK_Scalar1); canvas->drawText(gStyles[style].fName, -- cgit v1.2.3