Index: gm/fontmgr.cpp |
diff --git a/gm/fontmgr.cpp b/gm/fontmgr.cpp |
index dd8b14d2783b00153056979acf3aaa22bef460ea..ee3805c29f3e39d48ef345164a316697f704a85e 100644 |
--- a/gm/fontmgr.cpp |
+++ b/gm/fontmgr.cpp |
@@ -45,7 +45,11 @@ static SkScalar drawCharacter(SkCanvas* canvas, uint32_t character, SkScalar x, |
// it expects to get the same glyph when following this pattern. |
SkString familyName; |
typeface->getFamilyName(&familyName); |
+#ifdef SK_VERY_LEGACY_CREATE_TYPEFACE |
SkTypeface* typefaceCopy = fm->legacyCreateTypeface(familyName.c_str(), typeface->style()); |
+#else |
+ SkTypeface* typefaceCopy = fm->legacyCreateTypeface(familyName.c_str(), typeface->fontStyle()); |
+#endif |
SkSafeUnref(paint.setTypeface(typefaceCopy)); |
return drawString(canvas, ch, x, y, paint) + 20; |
} |