Index: src/core/SkFontMgr.cpp |
diff --git a/src/core/SkFontMgr.cpp b/src/core/SkFontMgr.cpp |
index 524691646399c5716b4c6c57d4880c27d31c9529..ab04250c0343787f43358b4ec3e120a49ae0c56f 100644 |
--- a/src/core/SkFontMgr.cpp |
+++ b/src/core/SkFontMgr.cpp |
@@ -132,6 +132,13 @@ SkTypeface* SkFontMgr::createFromStream(SkStreamAsset* stream, int ttcIndex) con |
return this->onCreateFromStream(stream, ttcIndex); |
} |
+SkTypeface* SkFontMgr::createFromStream(SkStreamAsset* stream, const FontParameters& params) const { |
+ if (nullptr == stream) { |
+ return nullptr; |
+ } |
+ return this->onCreateFromStream(stream, params); |
+} |
+ |
SkTypeface* SkFontMgr::createFromFontData(SkFontData* data) const { |
if (nullptr == data) { |
return nullptr; |
@@ -140,6 +147,11 @@ SkTypeface* SkFontMgr::createFromFontData(SkFontData* data) const { |
} |
// This implementation is temporary until it can be made pure virtual. |
+SkTypeface* SkFontMgr::onCreateFromStream(SkStreamAsset* stream, const FontParameters& p) const { |
+ return this->createFromStream(stream, p.getCollectionIndex()); |
+} |
+ |
+// This implementation is temporary until it can be made pure virtual. |
SkTypeface* SkFontMgr::onCreateFromFontData(SkFontData* data) const { |
SkTypeface* ret = this->createFromStream(data->detachStream(), data->getIndex()); |
delete data; |