зеркало из https://github.com/mozilla/moz-skia.git
Reverting r10608 (Add getFamilyNames to SkTypeface) due to compilation failures
git-svn-id: http://skia.googlecode.com/svn/trunk@10609 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
246b1c266f
Коммит
f7af91bd79
|
@ -233,14 +233,13 @@ 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 unref() the returned pointer.
|
||||
* It is the caller's responsibility to SK_DELETE the returned pointer.
|
||||
*/
|
||||
LocalizedStrings* createFamilyNameIterator() const;
|
||||
LocalizedStrings* getFamilyNames() const;
|
||||
|
||||
/**
|
||||
* Return the family name for this typeface. It will always be returned
|
||||
|
@ -312,7 +311,7 @@ protected:
|
|||
|
||||
virtual int onGetUPEM() const = 0;
|
||||
|
||||
virtual LocalizedStrings* onCreateFamilyNameIterator() const = 0;
|
||||
virtual LocalizedStrings* onGetFamilyNames() const = 0;
|
||||
|
||||
virtual int onGetTableTags(SkFontTableTag tags[]) const = 0;
|
||||
virtual size_t onGetTableData(SkFontTableTag, size_t offset,
|
||||
|
|
|
@ -194,8 +194,8 @@ int SkTypeface::getUnitsPerEm() const {
|
|||
return this->onGetUPEM();
|
||||
}
|
||||
|
||||
SkTypeface::LocalizedStrings* SkTypeface::createFamilyNameIterator() const {
|
||||
return this->onCreateFamilyNameIterator();
|
||||
SkTypeface::LocalizedStrings* SkTypeface::getFamilyNames() const {
|
||||
return this->onGetFamilyNames();
|
||||
}
|
||||
|
||||
void SkTypeface::getFamilyName(SkString* name) const {
|
||||
|
|
|
@ -202,8 +202,8 @@ int SkGTypeface::onGetUPEM() const {
|
|||
return fProxy->getUnitsPerEm();
|
||||
}
|
||||
|
||||
SkTypeface::LocalizedStrings* SkGTypeface::onCreateFamilyNameIterator() const {
|
||||
return fProxy->createFamilyNameIterator();
|
||||
SkTypeface::LocalizedStrings* SkGTypeface::onGetFamilyNames() const {
|
||||
return fProxy->getFamilyNames();
|
||||
}
|
||||
|
||||
int SkGTypeface::onGetTableTags(SkFontTableTag tags[]) const {
|
||||
|
|
|
@ -1403,7 +1403,7 @@ int SkTypeface_FreeType::onCountGlyphs() const {
|
|||
return fGlyphCount;
|
||||
}
|
||||
|
||||
SkTypeface::LocalizedStrings* SkTypeface_FreeType::onCreateFamilyNameIterator() const {
|
||||
SkTypeface::LocalizedStrings* SkTypeface_FreeType::onGetFamilyNames() const {
|
||||
SkTypeface::LocalizedStrings* nameIter =
|
||||
SkOTUtils::LocalizedStrings_NameTable::CreateForFamilyNames(*this);
|
||||
if (NULL == nameIter) {
|
||||
|
|
|
@ -64,7 +64,7 @@ protected:
|
|||
int glyphCount) const SK_OVERRIDE;
|
||||
virtual int onCountGlyphs() const SK_OVERRIDE;
|
||||
|
||||
virtual LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE;
|
||||
virtual LocalizedStrings* onGetFamilyNames() const SK_OVERRIDE;
|
||||
|
||||
virtual int onGetTableTags(SkFontTableTag tags[]) const SK_OVERRIDE;
|
||||
virtual size_t onGetTableData(SkFontTableTag, size_t offset,
|
||||
|
|
|
@ -454,7 +454,7 @@ protected:
|
|||
|
||||
virtual int onGetUPEM() const SK_OVERRIDE;
|
||||
virtual SkStream* onOpenStream(int* ttcIndex) const SK_OVERRIDE;
|
||||
virtual SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const SK_OVERRIDE;
|
||||
virtual SkTypeface::LocalizedStrings* onGetFamilyNames() 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::onCreateFamilyNameIterator() const {
|
||||
SkTypeface::LocalizedStrings* SkTypeface_Mac::onGetFamilyNames() const {
|
||||
SkTypeface::LocalizedStrings* nameIter =
|
||||
SkOTUtils::LocalizedStrings_NameTable::CreateForFamilyNames(*this);
|
||||
if (NULL == nameIter) {
|
||||
|
|
|
@ -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* onCreateFamilyNameIterator() const SK_OVERRIDE;
|
||||
virtual SkTypeface::LocalizedStrings* onGetFamilyNames() 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::onCreateFamilyNameIterator() const {
|
||||
SkTypeface::LocalizedStrings* LogFontTypeface::onGetFamilyNames() const {
|
||||
SkTypeface::LocalizedStrings* nameIter =
|
||||
SkOTUtils::LocalizedStrings_NameTable::CreateForFamilyNames(*this);
|
||||
if (NULL == nameIter) {
|
||||
|
|
|
@ -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* onCreateFamilyNameIterator() const SK_OVERRIDE;
|
||||
virtual SkTypeface::LocalizedStrings* onGetFamilyNames() 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<IDWriteLocalizedStrings> fStrings;
|
||||
};
|
||||
|
||||
SkTypeface::LocalizedStrings* DWriteFontTypeface::onCreateFamilyNameIterator() const {
|
||||
SkTypeface::LocalizedStrings* DWriteFontTypeface::onGetFamilyNames() const {
|
||||
SkTScopedComPtr<IDWriteLocalizedStrings> familyNames;
|
||||
HRNM(fDWriteFontFamily->GetFamilyNames(&familyNames), "Could not obtain family names.");
|
||||
|
||||
|
|
|
@ -164,8 +164,7 @@ static void test_systemfonts(skiatest::Reporter* reporter, bool verbose) {
|
|||
printf("[%s]\n", familyName.c_str());
|
||||
}
|
||||
|
||||
SkAutoTUnref<SkTypeface::LocalizedStrings> familyNamesIter(
|
||||
typeface->createFamilyNameIterator());
|
||||
SkAutoTDelete<SkTypeface::LocalizedStrings> familyNamesIter(typeface->getFamilyNames());
|
||||
SkTypeface::LocalizedString familyNameLocalized;
|
||||
while (familyNamesIter->next(&familyNameLocalized)) {
|
||||
if (verbose) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче