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

Unified Diff: src/core/SkFontMgr.cpp

Issue 1590223003: Expose API for gx font variation axes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix FontConfig and Android. Created 4 years, 11 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 | « include/ports/SkFontMgr.h ('k') | src/ports/SkFontHost_FreeType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « include/ports/SkFontMgr.h ('k') | src/ports/SkFontHost_FreeType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698