Index: tools/sk_tool_utils_font.cpp |
diff --git a/tools/sk_tool_utils_font.cpp b/tools/sk_tool_utils_font.cpp |
index 7cee944b5250d70d8d5e09bc8fd9097e396fff8b..70da87f82be7752dbe7edc91309fe3d925168587 100644 |
--- a/tools/sk_tool_utils_font.cpp |
+++ b/tools/sk_tool_utils_font.cpp |
@@ -6,6 +6,7 @@ |
*/ |
#include "Resources.h" |
+#include "SkFontMgr.h" |
#include "SkOSFile.h" |
#include "SkTestScalerContext.h" |
#include "SkThread.h" |
@@ -14,7 +15,10 @@ |
namespace sk_tool_utils { |
-#include "test_font_data.cpp" |
+#include "test_font_monospace.cpp" |
+#include "test_font_sans_serif.cpp" |
+#include "test_font_serif.cpp" |
+#include "test_font_index.cpp" |
static void release_portable_typefaces() { |
// We'll clean this up in our own tests, but disable for clients. |
@@ -44,7 +48,8 @@ SkTypeface* create_font(const char* name, SkTypeface::Style style) { |
} |
if (!fontData) { |
SkDebugf("missing %s %d\n", name, style); |
mtklein
2015/06/09 14:39:49
Should we consider just crashing here instead?
caryclark
2015/06/09 16:37:21
Let's defer the crash until after old tests have b
|
- return SkTypeface::CreateFromName(name, style); |
+ SkAutoTUnref<SkFontMgr> fm(SkFontMgr::RefDefault()); |
mtklein
2015/06/09 14:39:48
Is this something like
// If we called SkTypeface
caryclark
2015/06/09 16:37:21
Done.
|
+ return fm->legacyCreateTypeface(name, style); |
} |
} else { |
sub = &gSubFonts[gDefaultFontIndex]; |