summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-07 17:09:22 +0000
committerBen Murdoch <benm@google.com>2013-08-12 09:12:59 +0100
commit3a3bdfe14746073e2f89c95879adc3bb919c0afa (patch)
tree5127e4f310959cd1723196768f23cb13cf4b788c
parent803259a4d74644447cecd4aa11da335edcdf614d (diff)
downloadinclude-3a3bdfe14746073e2f89c95879adc3bb919c0afa.tar.gz
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/include@10615 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--core/SkTypeface.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/SkTypeface.h b/core/SkTypeface.h
index a2bef4b..ca88a1b 100644
--- a/core/SkTypeface.h
+++ b/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,