diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/ports/SkFontMgr.h | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/include/ports/SkFontMgr.h b/include/ports/SkFontMgr.h index 08e406a97d..866af45949 100644 --- a/include/ports/SkFontMgr.h +++ b/include/ports/SkFontMgr.h @@ -104,10 +104,6 @@ public: */ sk_sp<SkTypeface> makeFromStream(std::unique_ptr<SkStreamAsset>, int ttcIndex = 0) const; -#ifdef SK_SUPPORT_LEGACY_FONTMGR_API - using FontParameters = SkFontArguments; -#endif - /* Experimental, API subject to change. */ sk_sp<SkTypeface> makeFromStream(std::unique_ptr<SkStreamAsset>, const SkFontArguments&) const; @@ -128,15 +124,6 @@ public: sk_sp<SkTypeface> legacyMakeTypeface(const char familyName[], SkFontStyle style) const; -#ifdef SK_SUPPORT_LEGACY_FONTMGR_API - SkTypeface* createFromData(SkData* data, int ttcIndex = 0) const; - SkTypeface* createFromStream(SkStreamAsset* strm, int ttcIndex = 0) const; - SkTypeface* createFromStream(SkStreamAsset* strm, const SkFontArguments& args) const; - SkTypeface* createFromFontData(std::unique_ptr<SkFontData> fd) const; - SkTypeface* createFromFile(const char path[], int ttcIndex = 0) const; - SkTypeface* legacyCreateTypeface(const char familyName[], SkFontStyle style) const; -#endif - /** Return the default fontmgr. */ static sk_sp<SkFontMgr> RefDefault(); @@ -156,28 +143,6 @@ protected: virtual SkTypeface* onMatchFaceStyle(const SkTypeface*, const SkFontStyle&) const = 0; -#ifdef SK_SUPPORT_LEGACY_FONTMGR_API - // legacy virtuals - virtual SkTypeface* onCreateFromData(SkData*, int) const { return nullptr; } - virtual SkTypeface* onCreateFromStream(SkStreamAsset*, int) const { return nullptr; } - virtual SkTypeface* onCreateFromStream(SkStreamAsset*, const SkFontArguments&) const; - virtual SkTypeface* onCreateFromFontData(std::unique_ptr<SkFontData>) const; - virtual SkTypeface* onCreateFromFile(const char[], int) const { return nullptr; } - virtual SkTypeface* onLegacyCreateTypeface(const char[], SkFontStyle) const { - return nullptr; - } - - // new virtuals express as calling legacy versions - - virtual sk_sp<SkTypeface> onMakeFromData(sk_sp<SkData> data, int ttcIndex) const; - virtual sk_sp<SkTypeface> onMakeFromStreamIndex(std::unique_ptr<SkStreamAsset> strm, - int ttcIndex) const; - virtual sk_sp<SkTypeface> onMakeFromStreamArgs(std::unique_ptr<SkStreamAsset> strm, - const SkFontArguments& args) const; - virtual sk_sp<SkTypeface> onMakeFromFontData(std::unique_ptr<SkFontData> fd) const; - virtual sk_sp<SkTypeface> onMakeFromFile(const char path[], int ttcIndex) const; - virtual sk_sp<SkTypeface> onLegacyMakeTypeface(const char familyName[], SkFontStyle style) const; -#else virtual sk_sp<SkTypeface> onMakeFromData(sk_sp<SkData>, int ttcIndex) const = 0; virtual sk_sp<SkTypeface> onMakeFromStreamIndex(std::unique_ptr<SkStreamAsset>, int ttcIndex) const = 0; @@ -187,7 +152,6 @@ protected: virtual sk_sp<SkTypeface> onMakeFromFile(const char path[], int ttcIndex) const = 0; virtual sk_sp<SkTypeface> onLegacyMakeTypeface(const char familyName[], SkFontStyle) const = 0; -#endif private: |