Commit 7b3013e6 authored by thestig@chromium.org's avatar thestig@chromium.org

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
parent 765d0cf5
...@@ -35,9 +35,10 @@ FontConfigDirect::FontConfigDirect() ...@@ -35,9 +35,10 @@ FontConfigDirect::FontConfigDirect()
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
static bool IsFallbackFontAllowed(const std::string& family) static bool IsFallbackFontAllowed(const std::string& family)
{ {
return family == "Sans" || const char* family_cstr = family.c_str();
family == "Serif" || return strcasecmp(family_cstr, "sans") == 0 ||
family == "Monospace"; strcasecmp(family_cstr, "serif") == 0 ||
strcasecmp(family_cstr, "monospace") == 0;
} }
bool FontConfigDirect::Match(std::string* result_family, bool FontConfigDirect::Match(std::string* result_family,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment