Index: Source/platform/fonts/skia/FontCustomPlatformDataSkia.cpp |
diff --git a/Source/platform/fonts/skia/FontCustomPlatformDataSkia.cpp b/Source/platform/fonts/skia/FontCustomPlatformDataSkia.cpp |
index 87d8a01230d28beffae12e228408905eed13c425..b175fc0885265e3a3a8735565e1cdc75bf28a60e 100644 |
--- a/Source/platform/fonts/skia/FontCustomPlatformDataSkia.cpp |
+++ b/Source/platform/fonts/skia/FontCustomPlatformDataSkia.cpp |
@@ -35,6 +35,7 @@ |
#include "platform/LayoutTestSupport.h" |
#include "platform/SharedBuffer.h" |
+#include "platform/fonts/FontCache.h" |
#include "platform/fonts/FontPlatformData.h" |
#include "platform/fonts/opentype/OpenTypeSanitizer.h" |
#include "third_party/skia/include/core/SkStream.h" |
@@ -69,7 +70,11 @@ PassOwnPtr<FontCustomPlatformData> FontCustomPlatformData::create(SharedBuffer* |
buffer = transcodeBuffer.get(); |
RefPtr<SkMemoryStream> stream = adoptRef(new SkMemoryStream(buffer->getAsSkData().get())); |
+#if OS(WIN) && !ENABLE(GDI_FONTS_ON_WINDOWS) |
+ RefPtr<SkTypeface> typeface = adoptRef(FontCache::fontCache()->fontManager()->createFromStream(stream.get())); |
+#else |
RefPtr<SkTypeface> typeface = adoptRef(SkTypeface::CreateFromStream(stream.get())); |
+#endif |
if (!typeface) |
return nullptr; |