Index: Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp |
diff --git a/Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp b/Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp |
index 1857d7da73ab8974038a95793f1aad0c3411f5f2..83145c13396e02ccb0074b4c3c6a72f8ecd1205e 100644 |
--- a/Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp |
+++ b/Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp |
@@ -211,6 +211,15 @@ SkFontID FontPlatformData::uniqueID() const |
return m_typeface->uniqueID(); |
} |
+String FontPlatformData::fontFamilyName() const |
+{ |
+ SkTypeface::LocalizedStrings* fontFamilyIterator = this->typeface()->createFamilyNameIterator(); |
+ SkTypeface::LocalizedString localizedString; |
+ while (fontFamilyIterator->next(&localizedString) && !localizedString.fString.size()) { } |
+ fontFamilyIterator->unref(); |
+ return String(localizedString.fString.c_str()); |
+} |
+ |
bool FontPlatformData::operator==(const FontPlatformData& a) const |
{ |
// If either of the typeface pointers are null then we test for pointer |