summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 20:04:07 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 20:04:07 +0000
commitacee2cc4ffddb4b9ea10a3665c54eb80d24c2fef (patch)
tree95a4326c0cc47ef002a0f74a9262bea84d555f5e
parentbc81ad921de605ebb3df503884a5daddbb26a1ef (diff)
downloadchromium_src-acee2cc4ffddb4b9ea10a3665c54eb80d24c2fef.zip
chromium_src-acee2cc4ffddb4b9ea10a3665c54eb80d24c2fef.tar.gz
chromium_src-acee2cc4ffddb4b9ea10a3665c54eb80d24c2fef.tar.bz2
Linux: make "NonAntiAliasedSans" a magic font name.
This will be used in a layout test for per-strike renderer preferences. BUG=none TEST=Future layout test http://codereview.chromium.org/660383 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40410 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--skia/ext/SkFontHost_fontconfig_direct.cpp4
-rw-r--r--webkit/tools/test_shell/resources/linux-fontconfig-config12
2 files changed, 15 insertions, 1 deletions
diff --git a/skia/ext/SkFontHost_fontconfig_direct.cpp b/skia/ext/SkFontHost_fontconfig_direct.cpp
index 99e05f6..a055c2f 100644
--- a/skia/ext/SkFontHost_fontconfig_direct.cpp
+++ b/skia/ext/SkFontHost_fontconfig_direct.cpp
@@ -38,7 +38,9 @@ static bool IsFallbackFontAllowed(const std::string& family)
const char* family_cstr = family.c_str();
return strcasecmp(family_cstr, "sans") == 0 ||
strcasecmp(family_cstr, "serif") == 0 ||
- strcasecmp(family_cstr, "monospace") == 0;
+ strcasecmp(family_cstr, "monospace") == 0 ||
+ // This is a special case used for a layout test
+ strcasecmp(family_cstr, "NonAntiAliasedSans") == 0;
}
bool FontConfigDirect::Match(std::string* result_family,
diff --git a/webkit/tools/test_shell/resources/linux-fontconfig-config b/webkit/tools/test_shell/resources/linux-fontconfig-config
index cb1e3773..981ec2f 100644
--- a/webkit/tools/test_shell/resources/linux-fontconfig-config
+++ b/webkit/tools/test_shell/resources/linux-fontconfig-config
@@ -111,4 +111,16 @@
<string>Times New Roman</string>
</edit>
</match>
+
+ <match target="pattern">
+ <test name="family" compare="eq">
+ <string>NonAntiAliasedSans</string>
+ </test>
+ <edit name="family" mode="assign">
+ <string>Arial</string>
+ </edit>
+ <edit name="antialias" mode="assign">
+ <bool>false</bool>
+ </edit>
+ </match>
</fontconfig>