From dcc8cf2e65d1aa555cce12431a16547e66b469ee Mon Sep 17 00:00:00 2001 From: Steve Block Date: Tue, 27 Apr 2010 16:31:00 +0100 Subject: Merge webkit.org at r58033 : Initial merge by git Change-Id: If006c38561af287c50cd578d251629b51e4d8cd1 --- WebCore/platform/graphics/chromium/FontCacheLinux.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'WebCore/platform/graphics/chromium/FontCacheLinux.cpp') diff --git a/WebCore/platform/graphics/chromium/FontCacheLinux.cpp b/WebCore/platform/graphics/chromium/FontCacheLinux.cpp index 03d23c7..ececd13 100644 --- a/WebCore/platform/graphics/chromium/FontCacheLinux.cpp +++ b/WebCore/platform/graphics/chromium/FontCacheLinux.cpp @@ -33,7 +33,6 @@ #include "AtomicString.h" #include "ChromiumBridge.h" -#include "CString.h" #include "Font.h" #include "FontDescription.h" #include "FontPlatformData.h" @@ -47,6 +46,7 @@ #include #include +#include namespace WebCore { @@ -107,7 +107,9 @@ FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontD const char* name = 0; CString s; - if (family.length() == 0) { + // If we're creating a fallback font (e.g. "-webkit-monospace"), convert the name into + // the fallback name (like "monospace") that fontconfig understands. + if (!family.length() || family.startsWith("-webkit-")) { static const struct { FontDescription::GenericFamilyType mType; const char* mName; @@ -145,6 +147,7 @@ FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontD FontPlatformData* result = new FontPlatformData(tf, + name, fontDescription.computedSize(), (style & SkTypeface::kBold) && !tf->isBold(), (style & SkTypeface::kItalic) && !tf->isItalic()); -- cgit v1.1