Index: gm/coloremoji.cpp |
diff --git a/gm/coloremoji.cpp b/gm/coloremoji.cpp |
index 5a2703b4afd9040a5003f58d966b53a0b74f6387..36897c52a87279523e9e49831d83f86bb09a10f0 100644 |
--- a/gm/coloremoji.cpp |
+++ b/gm/coloremoji.cpp |
@@ -54,15 +54,8 @@ protected: |
const char* text; |
} emojiFonts[2]; |
virtual void onOnceBeforeDraw() override { |
- SkString filename = GetResourcePath("/Funkster.ttf"); |
- SkAutoTDelete<SkFILEStream> stream(new SkFILEStream(filename.c_str())); |
- if (stream->isValid()) { |
- fCBDT_CBLC_Typeface.reset(SkTypeface::CreateFromStream(stream.detach())); |
- emojiFonts[0].typeface = fCBDT_CBLC_Typeface; |
- } else { |
- SkDebugf("Could not find Funkster.ttf, please set --resourcePath correctly.\n"); |
- emojiFonts[0].typeface = NULL; |
- } |
+ fCBDT_CBLC_Typeface.reset(GetResourceAsTypeface("/fonts/Funkster.ttf")); |
+ emojiFonts[0].typeface = fCBDT_CBLC_Typeface; |
emojiFonts[0].text = "hamburgerfons"; |
fSBIX_Typeface.reset(SkTypeface::CreateFromName("Apple Color Emoji", SkTypeface::kNormal)); |