Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1440)

Unified Diff: Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp

Issue 22923010: DevTools: Add CSS.getPlatformFontsForNode in protocol.json (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: use HFONT instead of SKTypeface on Win Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « Source/core/platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h ('k') | Source/core/rendering/InlineTextBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698