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

Unified Diff: gm/gammatext.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/fontcache.cpp ('k') | gm/textblob.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gammatext.cpp
diff --git a/gm/gammatext.cpp b/gm/gammatext.cpp
index c7d4309f970de134b2839250aa8cc902cc9bcfa6..8fa5171844cedc65b71e4b0b008766db28d347a4 100644
--- a/gm/gammatext.cpp
+++ b/gm/gammatext.cpp
@@ -19,7 +19,7 @@ static sk_sp<SkShader> make_heatGradient(const SkPoint pts[2]) {
}
static bool setFont(SkPaint* paint, const char name[]) {
- paint->setTypeface(SkTypeface::MakeFromName(name, SkTypeface::kNormal));
+ paint->setTypeface(SkTypeface::MakeFromName(name, SkFontStyle()));
return SkToBool(paint->getTypeface());
}
@@ -104,7 +104,8 @@ static sk_sp<SkShader> make_gradient(SkColor c) {
}
static void set_face(SkPaint* paint) {
- paint->setTypeface(SkTypeface::MakeFromName("serif", SkTypeface::kItalic));
+ paint->setTypeface(SkTypeface::MakeFromName("serif",
+ SkFontStyle::FromOldStyle(SkTypeface::kItalic)));
}
static void draw_pair(SkCanvas* canvas, SkPaint* paint, const sk_sp<SkShader>& shader) {
« no previous file with comments | « gm/fontcache.cpp ('k') | gm/textblob.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698