diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-11 20:13:36 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-11 20:13:36 +0000 |
commit | ed268bfed3205347a90557c5029f37e90cc01956 (patch) | |
tree | fc337dceafb411264f644af0c47785d98053da6a /src/core/SkFontStream.h | |
parent | fe7533eebe777cc66c7f8fa7a03f00572755c5b4 (diff) |
add (mac) test for ttcindex in SkFontStream
git-svn-id: http://skia.googlecode.com/svn/trunk@8073 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkFontStream.h')
-rw-r--r-- | src/core/SkFontStream.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/SkFontStream.h b/src/core/SkFontStream.h index 9cd51fc708..0f7a052e6a 100644 --- a/src/core/SkFontStream.h +++ b/src/core/SkFontStream.h @@ -15,8 +15,9 @@ class SkStream; class SkFontStream { public: /** - * Return the number of shared 'fonts' inside a TTC sfnt, or return 0 - * if the stream is a normal sfnt (not a TTC). + * Return the number of shared directories inside a TTC sfnt, or return 1 + * if the stream is a normal sfnt (ttf). If there is an error or + * no directory is found, return 0. * * Note: the stream is rewound initially, but is returned at an arbitrary * read offset. @@ -39,6 +40,10 @@ public: */ static size_t GetTableData(SkStream*, int ttcIndex, SkFontTableTag tag, size_t offset, size_t length, void* data); + + static size_t GetTableSize(SkStream* stream, int ttcIndex, SkFontTableTag tag) { + return GetTableData(stream, ttcIndex, tag, 0, ~0U, NULL); + } }; #endif |