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

Unified Diff: gm/strokefill.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/srcmode.cpp ('k') | gm/stroketext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/strokefill.cpp
diff --git a/gm/strokefill.cpp b/gm/strokefill.cpp
index 5f943df6ce2caf89277afe6cfef0bf8c1150d2d8..4566eea9ada502fdac5a1b89ff39f411fd408eca 100644
--- a/gm/strokefill.cpp
+++ b/gm/strokefill.cpp
@@ -48,12 +48,10 @@ protected:
paint.setTextSize(SkIntToScalar(100));
paint.setStrokeWidth(SkIntToScalar(5));
- SkTypeface* face = SkTypeface::CreateFromName("Papyrus", SkTypeface::kNormal);
- SkSafeUnref(paint.setTypeface(face));
+ sk_tool_utils::set_portable_typeface(&paint, "Papyrus");
show_bold(canvas, "Hello", 5, x, y, paint);
- face = SkTypeface::CreateFromName("Hiragino Maru Gothic Pro", SkTypeface::kNormal);
- SkSafeUnref(paint.setTypeface(face));
+ sk_tool_utils::set_portable_typeface(&paint, "Hiragino Maru Gothic Pro");
const unsigned char hyphen[] = { 0xE3, 0x83, 0xBC };
show_bold(canvas, hyphen, SK_ARRAY_COUNT(hyphen), x + SkIntToScalar(300), y, paint);
« no previous file with comments | « gm/srcmode.cpp ('k') | gm/stroketext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698