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

Unified Diff: gm/pathreverse.cpp

Issue 407183003: add portable and canonical font support for DM (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add atexit; rename to create_... Created 6 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/offsetimagefilter.cpp ('k') | gm/pictureimagefilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/pathreverse.cpp
diff --git a/gm/pathreverse.cpp b/gm/pathreverse.cpp
index 77687f4e4a03732ccea83daeff55e369916ff3fd..fd134041989ea76078d366b9ad7bc8439af7f948 100644
--- a/gm/pathreverse.cpp
+++ b/gm/pathreverse.cpp
@@ -52,8 +52,7 @@ static void test_rev(SkCanvas* canvas) {
SkPaint paint;
paint.setTextSize(SkIntToScalar(100));
- SkTypeface* hira = SkTypeface::CreateFromName("Hiragino Maru Gothic Pro", SkTypeface::kNormal);
- SkSafeUnref(paint.setTypeface(hira));
+ sk_tool_utils::set_portable_typeface(&paint, "Hiragino Maru Gothic Pro");
path.reset();
paint.getTextPath("e", 1, 50, 50, &path);
canvas->translate(0, 100);
@@ -103,8 +102,7 @@ protected:
SkPaint paint;
paint.setTextSize(SkIntToScalar(100));
- SkTypeface* hira = SkTypeface::CreateFromName("Hiragino Maru Gothic Pro", SkTypeface::kNormal);
- SkSafeUnref(paint.setTypeface(hira));
+ sk_tool_utils::set_portable_typeface(&paint, "Hiragino Maru Gothic Pro");
path.reset();
paint.getTextPath("e", 1, 50, 50, &path);
canvas->translate(0, 100);
« no previous file with comments | « gm/offsetimagefilter.cpp ('k') | gm/pictureimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698