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)); |
} |
} |