Index: include/ports/SkFontMgr.h |
=================================================================== |
--- include/ports/SkFontMgr.h (revision 8442) |
+++ include/ports/SkFontMgr.h (working copy) |
@@ -20,6 +20,9 @@ |
virtual int count() = 0; |
virtual void getStyle(int index, SkFontStyle*, SkString* style) = 0; |
virtual SkTypeface* createTypeface(int index) = 0; |
+ virtual SkTypeface* matchStyle(const SkFontStyle& pattern) = 0; |
+ |
+ static SkFontStyleSet* CreateEmpty(); |
}; |
class SkFontMgr : public SkRefCnt { |
@@ -28,6 +31,8 @@ |
void getFamilyName(int index, SkString* familyName); |
SkFontStyleSet* createStyleSet(int index); |
+ SkFontStyleSet* matchFamily(const char familyName[]); |
+ |
/** |
* Find the closest matching typeface to the specified familyName and style |
* and return a ref to it. The caller must call unref() on the returned |
@@ -71,6 +76,8 @@ |
virtual void onGetFamilyName(int index, SkString* familyName) = 0; |
virtual SkFontStyleSet* onCreateStyleSet(int index) = 0; |
+ virtual SkFontStyleSet* onMatchFamily(const char familyName[]) = 0; |
+ |
virtual SkTypeface* onMatchFamilyStyle(const char familyName[], |
const SkFontStyle&) = 0; |
virtual SkTypeface* onMatchFaceStyle(const SkTypeface*, |