From 839702b61934914118ec557dd641be322eba3b5f Mon Sep 17 00:00:00 2001 From: "bungeman@google.com" Date: Wed, 7 Aug 2013 17:09:22 +0000 Subject: 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 --- src/core/SkTypeface.cpp | 4 ++-- src/fonts/SkGScalerContext.cpp | 4 ++-- src/fonts/SkGScalerContext.h | 2 +- src/ports/SkFontHost_FreeType.cpp | 2 +- src/ports/SkFontHost_FreeType_common.h | 2 +- src/ports/SkFontHost_mac.cpp | 4 ++-- src/ports/SkFontHost_win.cpp | 4 ++-- src/ports/SkFontHost_win_dw.cpp | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/core/SkTypeface.cpp b/src/core/SkTypeface.cpp index 507c1bf2a6..dbe0f603b2 100644 --- a/src/core/SkTypeface.cpp +++ b/src/core/SkTypeface.cpp @@ -194,8 +194,8 @@ int SkTypeface::getUnitsPerEm() const { return this->onGetUPEM(); } -SkTypeface::LocalizedStrings* SkTypeface::getFamilyNames() const { - return this->onGetFamilyNames(); +SkTypeface::LocalizedStrings* SkTypeface::createFamilyNameIterator() const { + return this->onCreateFamilyNameIterator(); } void SkTypeface::getFamilyName(SkString* name) const { diff --git a/src/fonts/SkGScalerContext.cpp b/src/fonts/SkGScalerContext.cpp index 34a55e6d31..2c4ebe508d 100644 --- a/src/fonts/SkGScalerContext.cpp +++ b/src/fonts/SkGScalerContext.cpp @@ -202,8 +202,8 @@ int SkGTypeface::onGetUPEM() const { return fProxy->getUnitsPerEm(); } -SkTypeface::LocalizedStrings* SkGTypeface::onGetFamilyNames() const { - return fProxy->getFamilyNames(); +SkTypeface::LocalizedStrings* SkGTypeface::onCreateFamilyNameIterator() const { + return fProxy->createFamilyNameIterator(); } int SkGTypeface::onGetTableTags(SkFontTableTag tags[]) const { diff --git a/src/fonts/SkGScalerContext.h b/src/fonts/SkGScalerContext.h index 0a06b7c12b..5e73850af2 100644 --- a/src/fonts/SkGScalerContext.h +++ b/src/fonts/SkGScalerContext.h @@ -32,7 +32,7 @@ protected: virtual int onCountGlyphs() const SK_OVERRIDE; virtual int onGetUPEM() const SK_OVERRIDE; - virtual SkTypeface::LocalizedStrings* onGetFamilyNames() const SK_OVERRIDE; + virtual SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE; virtual int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE; virtual size_t onGetTableData(SkFontTableTag, size_t offset, diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp index c5542a9ddf..3a8a1ae207 100644 --- a/src/ports/SkFontHost_FreeType.cpp +++ b/src/ports/SkFontHost_FreeType.cpp @@ -1403,7 +1403,7 @@ int SkTypeface_FreeType::onCountGlyphs() const { return fGlyphCount; } -SkTypeface::LocalizedStrings* SkTypeface_FreeType::onGetFamilyNames() const { +SkTypeface::LocalizedStrings* SkTypeface_FreeType::onCreateFamilyNameIterator() const { SkTypeface::LocalizedStrings* nameIter = SkOTUtils::LocalizedStrings_NameTable::CreateForFamilyNames(*this); if (NULL == nameIter) { diff --git a/src/ports/SkFontHost_FreeType_common.h b/src/ports/SkFontHost_FreeType_common.h index 5c069d042d..c0f2dc7553 100644 --- a/src/ports/SkFontHost_FreeType_common.h +++ b/src/ports/SkFontHost_FreeType_common.h @@ -64,7 +64,7 @@ protected: int glyphCount) const SK_OVERRIDE; virtual int onCountGlyphs() const SK_OVERRIDE; - virtual LocalizedStrings* onGetFamilyNames() const SK_OVERRIDE; + virtual LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE; virtual int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE; virtual size_t onGetTableData(SkFontTableTag, size_t offset, diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp index 9600730f67..987f185101 100755 --- a/src/ports/SkFontHost_mac.cpp +++ b/src/ports/SkFontHost_mac.cpp @@ -454,7 +454,7 @@ protected: virtual int onGetUPEM() const SK_OVERRIDE; virtual SkStream* onOpenStream(int* ttcIndex) const SK_OVERRIDE; - virtual SkTypeface::LocalizedStrings* onGetFamilyNames() const SK_OVERRIDE; + virtual SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE; virtual int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE; virtual size_t onGetTableData(SkFontTableTag, size_t offset, size_t length, void* data) const SK_OVERRIDE; @@ -1750,7 +1750,7 @@ int SkTypeface_Mac::onGetUPEM() const { return CGFontGetUnitsPerEm(cgFont); } -SkTypeface::LocalizedStrings* SkTypeface_Mac::onGetFamilyNames() const { +SkTypeface::LocalizedStrings* SkTypeface_Mac::onCreateFamilyNameIterator() const { SkTypeface::LocalizedStrings* nameIter = SkOTUtils::LocalizedStrings_NameTable::CreateForFamilyNames(*this); if (NULL == nameIter) { diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp index d52774ca6d..708c66fdf7 100755 --- a/src/ports/SkFontHost_win.cpp +++ b/src/ports/SkFontHost_win.cpp @@ -268,7 +268,7 @@ protected: virtual void onGetFontDescriptor(SkFontDescriptor*, bool*) const SK_OVERRIDE; virtual int onCountGlyphs() const SK_OVERRIDE; virtual int onGetUPEM() const SK_OVERRIDE; - virtual SkTypeface::LocalizedStrings* onGetFamilyNames() const SK_OVERRIDE; + virtual SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE; virtual int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE; virtual size_t onGetTableData(SkFontTableTag, size_t offset, size_t length, void* data) const SK_OVERRIDE; @@ -2056,7 +2056,7 @@ int LogFontTypeface::onGetUPEM() const { return upem; } -SkTypeface::LocalizedStrings* LogFontTypeface::onGetFamilyNames() const { +SkTypeface::LocalizedStrings* LogFontTypeface::onCreateFamilyNameIterator() const { SkTypeface::LocalizedStrings* nameIter = SkOTUtils::LocalizedStrings_NameTable::CreateForFamilyNames(*this); if (NULL == nameIter) { diff --git a/src/ports/SkFontHost_win_dw.cpp b/src/ports/SkFontHost_win_dw.cpp index cee8b362b2..5df90b47f3 100644 --- a/src/ports/SkFontHost_win_dw.cpp +++ b/src/ports/SkFontHost_win_dw.cpp @@ -495,7 +495,7 @@ protected: virtual void onGetFontDescriptor(SkFontDescriptor*, bool*) const SK_OVERRIDE; virtual int onCountGlyphs() const SK_OVERRIDE; virtual int onGetUPEM() const SK_OVERRIDE; - virtual SkTypeface::LocalizedStrings* onGetFamilyNames() const SK_OVERRIDE; + virtual SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE; virtual int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE; virtual size_t onGetTableData(SkFontTableTag, size_t offset, size_t length, void* data) const SK_OVERRIDE; @@ -1130,7 +1130,7 @@ private: SkTScopedComPtr fStrings; }; -SkTypeface::LocalizedStrings* DWriteFontTypeface::onGetFamilyNames() const { +SkTypeface::LocalizedStrings* DWriteFontTypeface::onCreateFamilyNameIterator() const { SkTScopedComPtr familyNames; HRNM(fDWriteFontFamily->GetFamilyNames(&familyNames), "Could not obtain family names."); -- cgit v1.2.3