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

Unified Diff: include/ports/SkFontMgr.h

Issue 1027373002: Font variations. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Android and tests. Created 5 years, 7 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..3de107189ce9765ec920c8017b11d7cd271cfec1 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;
@@ -93,6 +94,7 @@ public:
* must call unref() on the returned object if it is not null.
*/
SkTypeface* createFromStream(SkStreamAsset*, int ttcIndex = 0) const;
+ SkTypeface* createFromFontData(SkFontData*) const;
reed1 2015/05/08 20:46:30 ownership of data?
/**
* Create a typeface for the specified fileName and TTC index
@@ -129,6 +131,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