Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: include/ports/SkFontMgr.h

Issue 13312002: add matcher to fontstyleset (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/fontmgr.cpp ('k') | src/core/SkFontHost.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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*,
« no previous file with comments | « gm/fontmgr.cpp ('k') | src/core/SkFontHost.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698