diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 02:35:08 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 02:35:08 +0000 |
commit | 7b3013e65e46ba705b956ac957f086512dff0677 (patch) | |
tree | b4e95a107431a360ab2d18f348b21303f3b8843e /skia | |
parent | 765d0cf58c5e241facdee2bf1ceb7f95e6cb141e (diff) | |
download | chromium_src-7b3013e65e46ba705b956ac957f086512dff0677.zip chromium_src-7b3013e65e46ba705b956ac957f086512dff0677.tar.gz chromium_src-7b3013e65e46ba705b956ac957f086512dff0677.tar.bz2 |
Make font fallback case insensitive.
BUG=16047
TEST=Go to a site that has css with font-family: sans on Debian Lenny.
Review URL: http://codereview.chromium.org/149292
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20123 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r-- | skia/ext/SkFontHost_fontconfig_direct.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/skia/ext/SkFontHost_fontconfig_direct.cpp b/skia/ext/SkFontHost_fontconfig_direct.cpp index a732d06..43a8f00 100644 --- a/skia/ext/SkFontHost_fontconfig_direct.cpp +++ b/skia/ext/SkFontHost_fontconfig_direct.cpp @@ -35,9 +35,10 @@ FontConfigDirect::FontConfigDirect() // ----------------------------------------------------------------------------- static bool IsFallbackFontAllowed(const std::string& family) { - return family == "Sans" || - family == "Serif" || - family == "Monospace"; + const char* family_cstr = family.c_str(); + return strcasecmp(family_cstr, "sans") == 0 || + strcasecmp(family_cstr, "serif") == 0 || + strcasecmp(family_cstr, "monospace") == 0; } bool FontConfigDirect::Match(std::string* result_family, |