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

Unified Diff: Source/platform/fonts/win/FontCacheSkiaWin.cpp

Issue 235553003: Support sideloaded fonts for DirectWrite (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add ForTesting, iterator name Created 6 years, 8 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
« no previous file with comments | « Source/platform/fonts/skia/FontCacheSkia.cpp ('k') | Source/web/win/WebFontRendering.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
{
« no previous file with comments | « Source/platform/fonts/skia/FontCacheSkia.cpp ('k') | Source/web/win/WebFontRendering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698