diff options
author | 2013-03-29 14:57:22 +0000 | |
---|---|---|
committer | 2013-03-29 14:57:22 +0000 | |
commit | 964988f0e93f4a559b7e41db53d70d0282527350 (patch) | |
tree | 4c1143e43ebc98cd0ba39ed8da9e8e892ade33dc /include | |
parent | fc2f0d0e6e6f72503ff9504296556dc637059c15 (diff) |
add matcher to fontstyleset
Review URL: https://codereview.chromium.org/13312002
git-svn-id: http://skia.googlecode.com/svn/trunk@8444 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/ports/SkFontMgr.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/ports/SkFontMgr.h b/include/ports/SkFontMgr.h index d4bd01ff87..3160f80acb 100644 --- a/include/ports/SkFontMgr.h +++ b/include/ports/SkFontMgr.h @@ -20,6 +20,9 @@ public: 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 @@ public: 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 @@ protected: 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*, |