From 2cdc6713fb04c46ecbc73a724029a8b266004ddf Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Thu, 21 Mar 2013 18:22:00 +0000 Subject: add virtual SkTypeface::onOpenStream and override that for fontconfig (other ports to follow) When this is complete, we will be able to remove from SkFontHost - OpenStream - GetFileName Review URL: https://codereview.chromium.org/12988002 git-svn-id: http://skia.googlecode.com/svn/trunk@8299 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/core/SkTypeface.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/core/SkTypeface.h b/include/core/SkTypeface.h index edf93061f7..a89c31f0f5 100644 --- a/include/core/SkTypeface.h +++ b/include/core/SkTypeface.h @@ -193,6 +193,12 @@ public: */ int getUnitsPerEm() const; + /** + * Return a stream for the contents of the font data, or NULL on failure. + * If ttcIndex is not null, it is set to the TrueTypeCollection index + * of this typeface within the stream, or 0 if the stream is not a + * collection. + */ SkStream* openStream(int* ttcIndex) const; SkScalerContext* createScalerContext(const SkDescriptor*) const; @@ -212,8 +218,11 @@ protected: SkAdvancedTypefaceMetrics::PerGlyphInfo perGlyphInfo, const uint32_t* glyphIDs, uint32_t glyphIDsCount) const = 0; + // TODO: remove SkFontHost::OpenStream and make this guy pure-virtual + virtual SkStream* onOpenStream(int* ttcIndex) const; virtual int onGetUPEM() const; + virtual int onGetTableTags(SkFontTableTag tags[]) const; virtual size_t onGetTableData(SkFontTableTag, size_t offset, size_t length, void* data) const; -- cgit v1.2.3