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

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

Issue 31923005: Move Alternate Family Logic into separate header (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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/core/platform/graphics/FontCache.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 20100f9d215085aae51dd4a205b28b7a3b89475c..6a04442a9b8e5775a6a8a030a331c32eab561730 100644
--- a/Source/core/platform/graphics/skia/FontCacheSkia.cpp
+++ b/Source/core/platform/graphics/skia/FontCacheSkia.cpp
@@ -32,11 +32,12 @@
#include "SkFontMgr.h"
#include "SkTypeface.h"
-#include "platform/NotImplemented.h"
+#include "core/platform/graphics/AlternateFontFamily.h"
#include "core/platform/graphics/Font.h"
#include "core/platform/graphics/FontCache.h"
#include "core/platform/graphics/FontDescription.h"
#include "core/platform/graphics/SimpleFontData.h"
+#include "platform/NotImplemented.h"
#include "wtf/Assertions.h"
#include "wtf/text/AtomicString.h"
#include "wtf/text/CString.h"
@@ -95,7 +96,11 @@ PassRefPtr<SimpleFontData> FontCache::getSimilarFontPlatformData(const Font& fon
PassRefPtr<SimpleFontData> FontCache::getLastResortFallbackFont(const FontDescription& description, ShouldRetain shouldRetain)
{
- const FontPlatformData* fontPlatformData = getFallbackFontData(description);
+ const AtomicString fallbackFontFamily = getFallbackFontFamily(description);
+ const FontPlatformData* fontPlatformData = 0;
+ if (!fallbackFontFamily.isEmpty())
+ fontPlatformData = getFontResourcePlatformData(description, fallbackFontFamily);
+
if (!fontPlatformData) {
// we should at least have Arial; this is the SkFontHost_fontconfig last resort fallback
DEFINE_STATIC_LOCAL(const AtomicString, arialStr, ("Arial", AtomicString::ConstructFromLiteral));
« no previous file with comments | « Source/core/platform/graphics/FontCache.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698