aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-21 18:22:00 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-21 18:22:00 +0000
commit2cdc6713fb04c46ecbc73a724029a8b266004ddf (patch)
tree857570266690e36073caca4b41f7c3c1d050d2bc /include
parent9ae78506bd316683f94ded335be553d5399f742d (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/core/SkTypeface.h9
1 files changed, 9 insertions, 0 deletions
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;