Index: gm/textblobmixedsizes.cpp |
diff --git a/gm/textblobmixedsizes.cpp b/gm/textblobmixedsizes.cpp |
index 8f5dc85e48226187401f2fb82dd4e6a5312f82a4..9e57c2fe975245d56b7563d02757da0079ed45bd 100644 |
--- a/gm/textblobmixedsizes.cpp |
+++ b/gm/textblobmixedsizes.cpp |
@@ -27,6 +27,7 @@ |
protected: |
void onOnceBeforeDraw() override { |
+ SkAutoTUnref<SkTypeface> typeface(GetResourceAsTypeface("/fonts/HangingS.ttf")); |
SkTextBlobBuilder builder; |
// make textblob. To stress distance fields, we choose sizes appropriately |
@@ -34,7 +35,7 @@ |
paint.setAntiAlias(true); |
paint.setSubpixelText(true); |
paint.setLCDRenderText(true); |
- paint.setTypeface(MakeResourceAsTypeface("/fonts/HangingS.ttf")); |
+ paint.setTypeface(typeface); |
const char* text = "Skia"; |