Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Unified Diff: skia/ext/SkFontHost_fontconfig_direct.cpp

Issue 149292: Make font fallback case insensitive.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/SkFontHost_fontconfig_direct.cpp
===================================================================
--- skia/ext/SkFontHost_fontconfig_direct.cpp (revision 20069)
+++ skia/ext/SkFontHost_fontconfig_direct.cpp (working copy)
@@ -35,9 +35,10 @@
// -----------------------------------------------------------------------------
static bool IsFallbackFontAllowed(const std::string& family)
{
- return family == "Sans" ||
- family == "Serif" ||
- family == "Monospace";
+ const char* family_cstr = family.c_str();
agl 2009/07/08 01:17:28 NACK. These are magic strings from platform/graphi
+ return strcasecmp(family_cstr, "sans") == 0 ||
+ strcasecmp(family_cstr, "serif") == 0 ||
+ strcasecmp(family_cstr, "monospace") == 0;
}
bool FontConfigDirect::Match(std::string* result_family,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698