if we can't load Times, use default font

git-svn-id: http://skia.googlecode.com/svn/trunk@9412 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2013-06-03 17:45:29 +00:00
parent 59ce1377b1
commit 13e1540f8c

View File

@ -27,9 +27,13 @@ public:
paint.setAntiAlias(true);
paint.setShader(s)->unref();
SkAutoTUnref<SkTypeface> orig(SkTypeface::CreateFromName("Times",
SkTypeface::kBold));
SkTypeface* orig = SkTypeface::CreateFromName("Times",
SkTypeface::kBold);
if (NULL == orig) {
orig = SkTypeface::RefDefault();
}
fColorType = SkNEW_ARGS(SkGTypeface, (orig, paint));
orig->unref();
}
virtual ~ColorTypeGM() {