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

Unified Diff: Source/platform/fonts/skia/FontCustomPlatformDataSkia.cpp

Issue 113193005: Use SkFontMgr for webfont construction on windows (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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/FontCache.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « Source/platform/fonts/FontCache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698