From 37213558e6d269807cde031e59b9567d0db6e471 Mon Sep 17 00:00:00 2001 From: caryclark Date: Fri, 24 Jul 2015 11:08:01 -0700 Subject: make fontscalar gammatext lcdtext typeface verttext2 gm portable Pass generic font names to tool util function to generate platform specific fonts and gm test output by unique name. R=bungeman@google.com Review URL: https://codereview.chromium.org/1256903002 --- gm/gammatext.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gm/gammatext.cpp') diff --git a/gm/gammatext.cpp b/gm/gammatext.cpp index ed8c82929d..b6d4ea23f2 100644 --- a/gm/gammatext.cpp +++ b/gm/gammatext.cpp @@ -40,7 +40,9 @@ static bool setFont(SkPaint* paint, const char name[]) { class GammaTextGM : public skiagm::GM { protected: SkString onShortName() override { - return SkString("gammatext"); + SkString name("gammatext"); + name.append(sk_tool_utils::major_platform_os_name()); + return name; } SkISize onISize() override { @@ -72,7 +74,7 @@ protected: size_t len = strlen(text); SkPaint paint; - setFont(&paint, "Times"); + setFont(&paint, sk_tool_utils::platform_font_name("serif")); paint.setTextSize(SkIntToScalar(16)); paint.setAntiAlias(true); paint.setLCDRenderText(true); -- cgit v1.2.3