Changeset 44015 in webkit
- Timestamp:
- May 21, 2009 5:15:48 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r44011 r44015 1 2009-05-21 Evan Martin <evan@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 Flesh out font fallback for Chromium's Skia port. 6 getLastResortFallbackFont should fall back on well-known fonts. 7 https://bugs.webkit.org/show_bug.cgi?id=25860 8 9 * platform/graphics/chromium/FontCacheLinux.cpp: 10 (WebCore::FontCache::getLastResortFallbackFont): try known font names. 11 1 12 2009-05-21 Dan Bernstein <mitz@apple.com> 2 13 -
trunk/WebCore/platform/graphics/chromium/FontCacheLinux.cpp
r43756 r44015 46 46 #include "SkTypeface.h" 47 47 #include "SkUtils.h" 48 49 #include <wtf/Assertions.h> 48 50 49 51 namespace WebCore { … … 98 100 FontPlatformData* FontCache::getLastResortFallbackFont(const FontDescription& description) 99 101 { 100 static AtomicString arialStr("Arial"); 101 return getCachedFontPlatformData(description, arialStr); 102 static const AtomicString sansStr("Sans"); 103 static const AtomicString serifStr("Serif"); 104 static const AtomicString monospaceStr("Monospace"); 105 106 FontPlatformData* fontPlatformData = 0; 107 switch (description.genericFamily()) { 108 case FontDescription::SerifFamily: 109 fontPlatformData = getCachedFontPlatformData(description, serifStr); 110 break; 111 case FontDescription::MonospaceFamily: 112 fontPlatformData = getCachedFontPlatformData(description, monospaceStr); 113 break; 114 case FontDescription::SansSerifFamily: 115 default: 116 fontPlatformData = getCachedFontPlatformData(description, sansStr); 117 break; 118 } 119 120 ASSERT(fontPlatformData); 121 return fontPlatformData; 102 122 } 103 123
Note: See TracChangeset
for help on using the changeset viewer.