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[], |