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

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

Issue 402503003: Add more Windows-specific fonts to fallback path (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/skia/FontCacheSkia.cpp
diff --git a/Source/platform/fonts/skia/FontCacheSkia.cpp b/Source/platform/fonts/skia/FontCacheSkia.cpp
index a21fed4868ed198bd524c2879bc372cb115478d9..6093a23ef966e6e81a366162b80787717604559e 100644
--- a/Source/platform/fonts/skia/FontCacheSkia.cpp
+++ b/Source/platform/fonts/skia/FontCacheSkia.cpp
@@ -149,6 +149,17 @@ PassRefPtr<SimpleFontData> FontCache::getLastResortFallbackFont(const FontDescri
DEFINE_STATIC_LOCAL(const FontFaceCreationParams, arialCreationParams, (AtomicString("Arial", AtomicString::ConstructFromLiteral)));
fontPlatformData = getFontPlatformData(description, arialCreationParams);
}
+#if OS(WIN)
+ // Try some more Windows-specific fallbacks.
+ if (!fontPlatformData) {
+ DEFINE_STATIC_LOCAL(const FontFaceCreationParams, msuigothicCreationParams, (AtomicString("MS UI Gothic", AtomicString::ConstructFromLiteral)));
+ fontPlatformData = getFontPlatformData(description, msuigothicCreationParams);
+ }
+ if (!fontPlatformData) {
+ DEFINE_STATIC_LOCAL(const FontFaceCreationParams, mssansserifCreationParams, (AtomicString("Microsoft Sans Serif", AtomicString::ConstructFromLiteral)));
+ fontPlatformData = getFontPlatformData(description, mssansserifCreationParams);
+ }
+#endif
ASSERT(fontPlatformData);
return fontDataFromFontPlatformData(fontPlatformData, shouldRetain);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698