Chromium Code Reviews| 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, |