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

Unified Diff: gm/variedtext.cpp

Issue 1818043002: SkTypeface::MakeFromName to take SkFontStyle. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Android fix + nit fix Created 4 years, 7 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') | gm/verttext2.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/variedtext.cpp
diff --git a/gm/variedtext.cpp b/gm/variedtext.cpp
index e295cbc99802a2e2d793c1eb1efa0f925fc1e5bb..e33c40b7430bb4c715eb3e0b9b057c1f47b44c30 100644
--- a/gm/variedtext.cpp
+++ b/gm/variedtext.cpp
@@ -52,10 +52,12 @@ protected:
SkScalar h = SkIntToScalar(size.fHeight);
static_assert(4 == SK_ARRAY_COUNT(fTypefaces), "typeface_cnt");
- fTypefaces[0] = sk_tool_utils::create_portable_typeface("sans-serif", SkTypeface::kNormal);
- fTypefaces[1] = sk_tool_utils::create_portable_typeface("sans-serif", SkTypeface::kBold);
- fTypefaces[2] = sk_tool_utils::create_portable_typeface("serif", SkTypeface::kNormal);
- fTypefaces[3] = sk_tool_utils::create_portable_typeface("serif", SkTypeface::kBold);
+ fTypefaces[0] = sk_tool_utils::create_portable_typeface("sans-serif", SkFontStyle());
+ fTypefaces[1] = sk_tool_utils::create_portable_typeface("sans-serif",
+ SkFontStyle::FromOldStyle(SkTypeface::kBold));
+ fTypefaces[2] = sk_tool_utils::create_portable_typeface("serif", SkFontStyle());
+ fTypefaces[3] = sk_tool_utils::create_portable_typeface("serif",
+ SkFontStyle::FromOldStyle(SkTypeface::kBold));
SkRandom random;
for (int i = 0; i < kCnt; ++i) {
« no previous file with comments | « gm/typeface.cpp ('k') | gm/verttext2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698