Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1227)

Unified Diff: gm/verttext2.cpp

Issue 1256903002: make fontscalar gammatext lcdtext typeface verttext2 gm portable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove useless gm; fix nit Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/typeface.cpp ('k') | tools/sk_tool_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/verttext2.cpp
diff --git a/gm/verttext2.cpp b/gm/verttext2.cpp
index 9918049f10c8403daf2f44d5f4196287bcd79364..3a3955ee7c823aea93d2b28ae529e351ee229820 100644
--- a/gm/verttext2.cpp
+++ b/gm/verttext2.cpp
@@ -32,12 +32,16 @@ protected:
void onOnceBeforeDraw() override {
const int pointSize = 24;
textHeight = SkIntToScalar(pointSize);
- fProp = sk_tool_utils::create_portable_typeface("Helvetica", SkTypeface::kNormal);
- fMono = sk_tool_utils::create_portable_typeface("Courier New", SkTypeface::kNormal);
+ fProp = SkTypeface::CreateFromName(sk_tool_utils::platform_font_name("sans-serif"),
+ SkTypeface::kNormal);
+ fMono = SkTypeface::CreateFromName(sk_tool_utils::platform_font_name("monospace"),
+ SkTypeface::kNormal);
}
SkString onShortName() override {
- return SkString("verttext2");
+ SkString name("verttext2");
+ name.append(sk_tool_utils::major_platform_os_name());
+ return name;
}
SkISize onISize() override { return SkISize::Make(640, 480); }
« no previous file with comments | « gm/typeface.cpp ('k') | tools/sk_tool_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698