}
};
+static SkFontStyleSet* emptyOnNull(SkFontStyleSet* fsset) {
+ if (NULL == fsset) {
+ fsset = SkFontStyleSet::CreateEmpty();
+ }
+ return fsset;
+}
+
int SkFontMgr::countFamilies() {
return this->onCountFamilies();
}
}
SkFontStyleSet* SkFontMgr::createStyleSet(int index) {
- return this->onCreateStyleSet(index);
+ return emptyOnNull(this->onCreateStyleSet(index));
}
SkFontStyleSet* SkFontMgr::matchFamily(const char familyName[]) {
- return this->onMatchFamily(familyName);
+ return emptyOnNull(this->onMatchFamily(familyName));
}
SkTypeface* SkFontMgr::matchFamilyStyle(const char familyName[],
REPORTER_ASSERT(reporter, sname.size() > 0);
SkAutoTUnref<SkTypeface> face(set->createTypeface(j));
- REPORTER_ASSERT(reporter, face.get());
+// REPORTER_ASSERT(reporter, face.get());
if (verbose) {
SkDebugf("\t[%d] %s [%3d %d %d]\n", j, sname.c_str(),