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

Unified Diff: tools/sk_tool_utils_font.cpp

Issue 1873923002: Begin switch to SkFontStyle for legacy calls. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Dont update bzl file now. Created 4 years, 8 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 | « src/ports/SkFontMgr_win_dw.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/sk_tool_utils_font.cpp
diff --git a/tools/sk_tool_utils_font.cpp b/tools/sk_tool_utils_font.cpp
index 0f8c96f6173470e8635b87d4dec38d5c57a563d4..df479265481f3043672fb6713d438f751817311a 100644
--- a/tools/sk_tool_utils_font.cpp
+++ b/tools/sk_tool_utils_font.cpp
@@ -47,7 +47,11 @@ SkTypeface* create_font(const char* name, SkTypeface::Style style) {
// If we called SkTypeface::CreateFromName() here we'd recurse infinitely,
// so we reimplement its core logic here inline without the recursive aspect.
SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault());
+#ifdef SK_VERY_LEGACY_CREATE_TYPEFACE
return fm->legacyCreateTypeface(name, style);
+#else
+ return fm->legacyCreateTypeface(name, SkFontStyle::FromOldStyle(style));
+#endif
}
} else {
sub = &gSubFonts[gDefaultFontIndex];
@@ -65,7 +69,7 @@ SkTypeface* create_font(const char* name, SkTypeface::Style style) {
fontData->fFontCache = SkSafeRef(font);
}
}
- return new SkTestTypeface(font, SkFontStyle(style));
+ return new SkTestTypeface(font, SkFontStyle::FromOldStyle(style));
}
}
« no previous file with comments | « src/ports/SkFontMgr_win_dw.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698