aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/fontmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gm/fontmgr.cpp')
-rw-r--r--gm/fontmgr.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/gm/fontmgr.cpp b/gm/fontmgr.cpp
index 6bed35426e..8d14e3a66d 100644
--- a/gm/fontmgr.cpp
+++ b/gm/fontmgr.cpp
@@ -313,7 +313,9 @@ protected:
sk_sp<SkFontStyleSet> set(fm->createStyleSet(i));
for (int j = 0; j < set->count() && j < 3; ++j) {
paint.setTypeface(sk_sp<SkTypeface>(set->createTypeface(j)));
- if (paint.getTypeface()) {
+ // Fonts with lots of glyphs are interesting, but can take a long time to find
+ // the glyphs which make up the maximum extent.
+ if (paint.getTypeface() && paint.getTypeface()->countGlyphs() < 1000) {
SkRect fontBounds = paint.getFontBounds();
x -= fontBounds.fLeft;
show_bounds(canvas, paint, x, y, boundsColors[index & 1]);