summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/chromium/FontCacheLinux.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-04-27 16:31:00 +0100
committerSteve Block <steveblock@google.com>2010-05-11 14:42:12 +0100
commitdcc8cf2e65d1aa555cce12431a16547e66b469ee (patch)
tree92a8d65cd5383bca9749f5327fb5e440563926e6 /WebCore/platform/graphics/chromium/FontCacheLinux.cpp
parentccac38a6b48843126402088a309597e682f40fe6 (diff)
downloadexternal_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.zip
external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.tar.gz
external_webkit-dcc8cf2e65d1aa555cce12431a16547e66b469ee.tar.bz2
Merge webkit.org at r58033 : Initial merge by git
Change-Id: If006c38561af287c50cd578d251629b51e4d8cd1
Diffstat (limited to 'WebCore/platform/graphics/chromium/FontCacheLinux.cpp')
-rw-r--r--WebCore/platform/graphics/chromium/FontCacheLinux.cpp7
1 files changed, 5 insertions, 2 deletions
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 <unicode/utf16.h>
#include <wtf/Assertions.h>
+#include <wtf/text/CString.h>
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());