diff options
Diffstat (limited to 'gm/fontmgr.cpp')
-rw-r--r-- | gm/fontmgr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gm/fontmgr.cpp b/gm/fontmgr.cpp index c9bf1e0735..f16af88249 100644 --- a/gm/fontmgr.cpp +++ b/gm/fontmgr.cpp @@ -251,7 +251,7 @@ public: SkGlyphID left = 0, right = 0, top = 0, bottom = 0; { - int numGlyphs = font.getTypeface()->countGlyphs(); + int numGlyphs = font.getTypefaceOrDefault()->countGlyphs(); SkRect min = {0, 0, 0, 0}; for (int i = 0; i < numGlyphs; ++i) { SkGlyphID glyphId = i; @@ -277,7 +277,7 @@ public: if (FLAGS_veryVerbose) { SkString name; - font.getTypeface()->getFamilyName(&name); + font.getTypefaceOrDefault()->getFamilyName(&name); canvas->drawString(name, fontBounds.fLeft, fontBounds.fBottom, labelFont, SkPaint()); } for (size_t i = 0; i < SK_ARRAY_COUNT(str); ++i) { @@ -332,7 +332,7 @@ protected: font.setTypeface(sk_sp<SkTypeface>(set->createTypeface(j))); // Fonts with lots of glyphs are interesting, but can take a long time to find // the glyphs which make up the maximum extent. - if (font.getTypeface() && font.getTypeface()->countGlyphs() < 1000) { + if (font.getTypefaceOrDefault() && font.getTypefaceOrDefault()->countGlyphs() < 1000) { SkRect fontBounds = SkFontPriv::GetFontBounds(font); x -= fontBounds.fLeft; show_bounds(canvas, font, x, y, boundsColors[index & 1]); |