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

Unified Diff: skia/ext/SkFontHost_fontconfig_direct.cpp

Issue 2838003: Map Liberation Sans Mono and Ascender Sans Mono to Courier New.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 6 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 49709)
+++ skia/ext/SkFontHost_fontconfig_direct.cpp (working copy)
@@ -33,7 +33,8 @@
{
OTHER,
SANS,
- SERIF
+ SERIF,
+ MONO
};
// Match the font name against a whilelist of fonts, returning the equivalence
@@ -50,9 +51,12 @@
// /etc/fonts/conf.d/30-metric-aliases.conf
// from my Ubuntu system, but we're better off being very conservative.
- // "Ascender Sans" and "Ascender Serif" are the tentative names of
- // another set of fonts metric-compatible with Arial and Times New Roman
- // with a character repertoire much larger than Liberation.
+ // "Ascender Sans", "Ascender Serif" and "Ascender Sans Mono" are the
+ // tentative names of another set of fonts metric-compatible with
+ // Arial, Times New Roman and Courier New with a character repertoire
Evan Martin 2010/06/14 23:08:55 nit: you have an extra space before "with"
+ // much larger than Liberation. Note that Ascender Sans Mono/Liberation
+ // Sans Mono are metrically compatible with Courier New, but the former
+ // is sans-serif while ther latter is serif.
if (strcasecmp(fontname, "Arial") == 0 ||
strcasecmp(fontname, "Liberation Sans") == 0 ||
strcasecmp(fontname, "Ascender Sans") == 0) {
@@ -61,6 +65,10 @@
strcasecmp(fontname, "Liberation Serif") == 0 ||
strcasecmp(fontname, "Ascender Serif") == 0) {
return SERIF;
+ } else if (strcasecmp(fontname, "Courier New") == 0 ||
+ strcasecmp(fontname, "Liberation Sans Mono") == 0 ||
Evan Martin 2010/06/14 23:08:55 I don't think we want to do this. If you have:
+ strcasecmp(fontname, "Ascender Sans Mono") == 0) {
+ return MONO;
}
return OTHER;
}
« 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