Chromium Code Reviews| 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()); |
|
eae
2013/08/19 19:36:43
This will return the first non-empty name, is that
lushnikov
2013/08/21 13:43:15
Yes, that's intended. I hope in future this will b
|
| +} |
| + |
| bool FontPlatformData::operator==(const FontPlatformData& a) const |
| { |
| // If either of the typeface pointers are null then we test for pointer |