diff options
author | caryclark <caryclark@google.com> | 2015-07-24 11:08:01 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-24 11:08:01 -0700 |
commit | 37213558e6d269807cde031e59b9567d0db6e471 (patch) | |
tree | 6ea9b08d1366a93e8a66693167128b9db8983e81 /gm/gammatext.cpp | |
parent | 6c2c2b07ed83e1f83008fac6eb1b62670b1dbdb1 (diff) |
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
Diffstat (limited to 'gm/gammatext.cpp')
-rw-r--r-- | gm/gammatext.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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); |