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

Unified Diff: Source/core/platform/graphics/skia/FontCacheSkia.cpp

Issue 23480016: Switch non-gdi windows font path to use new SkFontMgr (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 7 years, 3 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
Index: Source/core/platform/graphics/skia/FontCacheSkia.cpp
diff --git a/Source/core/platform/graphics/skia/FontCacheSkia.cpp b/Source/core/platform/graphics/skia/FontCacheSkia.cpp
index cba5debca22aca4f0f88ad8c12ce825e70df82a5..6cb10a6d20751aed65af9b5997fed70221d94afb 100644
--- a/Source/core/platform/graphics/skia/FontCacheSkia.cpp
+++ b/Source/core/platform/graphics/skia/FontCacheSkia.cpp
@@ -29,7 +29,8 @@
*/
#include "config.h"
-#include <unicode/locid.h>
+
+#include "SkFontMgr.h"
#include "SkTypeface.h"
#include "core/platform/NotImplemented.h"
#include "core/platform/graphics/Font.h"
@@ -39,6 +40,7 @@
#include "wtf/Assertions.h"
#include "wtf/text/AtomicString.h"
#include "wtf/text/CString.h"
+#include <unicode/locid.h>
namespace WebCore {
@@ -146,6 +148,12 @@ SkTypeface* FontCache::createTypeface(const FontDescription& fontDescription, co
if (fontDescription.italic())
style |= SkTypeface::kItalic;
+ // FIXME: Use SkFontStyle and matchFamilyStyle instead of legacyCreateTypeface.
+#if OS(WINDOWS) && !ENABLE(GDI_FONTS_ON_WINDOWS)
+ if (m_fontManager)
+ return m_fontManager->legacyCreateTypeface(name.data(), style);
+#endif
+
return SkTypeface::CreateFromName(name.data(), static_cast<SkTypeface::Style>(style));
}
« no previous file with comments | « Source/core/platform/graphics/FontCache.cpp ('k') | Source/core/platform/graphics/skia/FontCacheSkiaWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698