Index: Source/platform/fonts/skia/FontCacheSkia.cpp |
diff --git a/Source/platform/fonts/skia/FontCacheSkia.cpp b/Source/platform/fonts/skia/FontCacheSkia.cpp |
index 67d20f2a9b2404804879089bd91d7c28eb3a7903..2dc0ef2619b6edc0aea15b59f6091c0004592494 100644 |
--- a/Source/platform/fonts/skia/FontCacheSkia.cpp |
+++ b/Source/platform/fonts/skia/FontCacheSkia.cpp |
@@ -124,8 +124,14 @@ PassRefPtr<SkTypeface> FontCache::createTypeface(const FontDescription& fontDesc |
if (fontDescription.style()) |
style |= SkTypeface::kItalic; |
- // FIXME: Use SkFontStyle and matchFamilyStyle instead of legacyCreateTypeface. |
#if OS(WIN) |
+ if (s_sideloadedFonts) { |
+ HashMap<String, SkTypeface*>::iterator sideloadedFont = s_sideloadedFonts->find(name.data()); |
+ if (sideloadedFont != s_sideloadedFonts->end()) { |
+ return adoptRef(sideloadedFont->value); |
+ } |
+ } |
+ // FIXME: Use SkFontStyle and matchFamilyStyle instead of legacyCreateTypeface. |
if (m_fontManager) |
return adoptRef(m_fontManager->legacyCreateTypeface(name.data(), style)); |
#endif |