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

Unified Diff: Source/core/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp

Issue 22923010: DevTools: Add CSS.getPlatformFontsForNode in protocol.json (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address comments 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/chromium/FontPlatformDataChromiumWin.cpp
diff --git a/Source/core/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp b/Source/core/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp
index 91a37d31ddbe24f504aab22c2152651adc733de1..e74398b7bc7f9827e24417a1873113fb9cc5b13d 100644
--- a/Source/core/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp
+++ b/Source/core/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp
@@ -204,6 +204,15 @@ FontPlatformData::~FontPlatformData()
m_scriptCache = 0;
}
+String FontPlatformData::fontFamilyName() const
eae 2013/08/19 19:36:43 Until we switch windows over to use Skia for font
lushnikov 2013/08/21 13:43:15 Could you clarify the need for the LookupAltName?
+{
+ 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::isFixedPitch() const
{
#if ENABLE(GDI_FONTS_ON_WINDOWS)

Powered by Google App Engine
This is Rietveld 408576698