Index: Source/platform/fonts/win/FontCacheSkiaWin.cpp |
diff --git a/Source/platform/fonts/win/FontCacheSkiaWin.cpp b/Source/platform/fonts/win/FontCacheSkiaWin.cpp |
index 8f1ae21f65091c601becef20ebf005374fe6b56b..e6344e94d4e9c81beb3df9d8653518cbb06391ac 100644 |
--- a/Source/platform/fonts/win/FontCacheSkiaWin.cpp |
+++ b/Source/platform/fonts/win/FontCacheSkiaWin.cpp |
@@ -42,6 +42,18 @@ |
namespace WebCore { |
+HashMap<String, SkTypeface*>* FontCache::s_sideloadedFonts = 0; |
+ |
+// static |
+void FontCache::addSideloadedFontForTesting(SkTypeface* typeface) |
+{ |
+ if (!s_sideloadedFonts) |
+ s_sideloadedFonts = new HashMap<String, SkTypeface*>; |
+ SkString name; |
+ typeface->getFamilyName(&name); |
+ s_sideloadedFonts->set(name.c_str(), typeface); |
+} |
+ |
FontCache::FontCache() |
: m_purgePreventCount(0) |
{ |