diff options
author | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-07 17:09:22 +0000 |
---|---|---|
committer | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-07 17:09:22 +0000 |
commit | 839702b61934914118ec557dd641be322eba3b5f (patch) | |
tree | a236520027e9a13b87d2b1df3f4e0f387b503ba5 /include/core | |
parent | 488a337ea9673488530b01451470a2b89ec0a54f (diff) |
Add getFamilyNames to SkTypeface.
Committed: https://code.google.com/p/skia/source/detail?r=10589
Committed: https://code.google.com/p/skia/source/detail?r=10592
Committed: https://code.google.com/p/skia/source/detail?r=10608
Review URL: https://codereview.chromium.org/21716005
git-svn-id: http://skia.googlecode.com/svn/trunk@10615 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkTypeface.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/core/SkTypeface.h b/include/core/SkTypeface.h index a2bef4b40f..ca88a1bc76 100644 --- a/include/core/SkTypeface.h +++ b/include/core/SkTypeface.h @@ -233,13 +233,14 @@ public: public: virtual ~LocalizedStrings() { } virtual bool next(LocalizedString* localizedString) = 0; + void unref() { SkDELETE(this); } }; /** * Returns an iterator which will attempt to enumerate all of the * family names specified by the font. - * It is the caller's responsibility to SK_DELETE the returned pointer. + * It is the caller's responsibility to unref() the returned pointer. */ - LocalizedStrings* getFamilyNames() const; + LocalizedStrings* createFamilyNameIterator() const; /** * Return the family name for this typeface. It will always be returned @@ -311,7 +312,7 @@ protected: virtual int onGetUPEM() const = 0; - virtual LocalizedStrings* onGetFamilyNames() const = 0; + virtual LocalizedStrings* onCreateFamilyNameIterator() const = 0; virtual int onGetTableTags(SkFontTableTag tags[]) const = 0; virtual size_t onGetTableData(SkFontTableTag, size_t offset, |