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

Unified Diff: include/ports/SkFontMgr.h

Issue 1027373002: Font variations. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Slightly more palatable. Created 5 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
Index: include/ports/SkFontMgr.h
diff --git a/include/ports/SkFontMgr.h b/include/ports/SkFontMgr.h
index 4dde920085cb7da8dba2e860dba7d45550aab230..38022078a36428d8b6a6c0deb501ebd1d44b9f0c 100644
--- a/include/ports/SkFontMgr.h
+++ b/include/ports/SkFontMgr.h
@@ -12,6 +12,7 @@
#include "SkFontStyle.h"
class SkData;
+class SkFontData;
class SkStreamAsset;
class SkString;
class SkTypeface;
@@ -112,6 +113,9 @@ public:
static SkFontMgr* RefDefault();
protected:
+ friend class SkTypeface;
+ SkTypeface* createFromFontData(SkFontData*) const;
+
virtual int onCountFamilies() const = 0;
virtual void onGetFamilyName(int index, SkString* familyName) const = 0;
virtual SkFontStyleSet* onCreateStyleSet(int index)const = 0;
@@ -129,6 +133,8 @@ protected:
virtual SkTypeface* onCreateFromData(SkData*, int ttcIndex) const = 0;
virtual SkTypeface* onCreateFromStream(SkStreamAsset*, int ttcIndex) const = 0;
+ // ThODO: make pure virtual.
+ virtual SkTypeface* onCreateFromFontData(SkFontData*) const;
virtual SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const = 0;
virtual SkTypeface* onLegacyCreateTypeface(const char familyName[],

Powered by Google App Engine
This is Rietveld 408576698