diff options
author | jshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-07 18:54:49 +0000 |
---|---|---|
committer | jshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-07 18:54:49 +0000 |
commit | e202c44a3e224dfd090d80a01648db1d07093418 (patch) | |
tree | ae4c1bc8b78dba5888ec20d886e09aa283ddc973 /skia/ext/SkFontHost_fontconfig_direct.cpp | |
parent | a7e38577aab81d13d9fc1dff5a8b6fe164ed2102 (diff) | |
download | chromium_src-e202c44a3e224dfd090d80a01648db1d07093418.zip chromium_src-e202c44a3e224dfd090d80a01648db1d07093418.tar.gz chromium_src-e202c44a3e224dfd090d80a01648db1d07093418.tar.bz2 |
Treat "Ascender Sans" and "Ascender Serif" as equivalent to
"Arial" and "Times New Roman" as Liberation Sans/Serif are.
Ascender Sans/Serif are metrically compatible fonts with the
Arial/Times New Roman. The names are tentative and will change
when they're finally released.
I didn't add 'MONOSPACE' to FontEquivClass enum for 'Courier New => Ascender Sans Mono'. We can do that when the font and its name are finalized.
BUG=cros:3815 (http://crosbug.com/3815 )
TEST=Without Liberation/Arial/TNR on a machine but with Ascender Sans/Serif,
go to a page specifying Arial and Times New Roman. Ascender Sans/Serif
are used in their place and there is no noticeable layout issue.
Review URL: http://codereview.chromium.org/2674004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49077 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext/SkFontHost_fontconfig_direct.cpp')
-rw-r--r-- | skia/ext/SkFontHost_fontconfig_direct.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/skia/ext/SkFontHost_fontconfig_direct.cpp b/skia/ext/SkFontHost_fontconfig_direct.cpp index 2e19928..279af90 100644 --- a/skia/ext/SkFontHost_fontconfig_direct.cpp +++ b/skia/ext/SkFontHost_fontconfig_direct.cpp @@ -26,8 +26,8 @@ namespace { -// Equivalence classes, used to match the Liberation fonts with their -// metric-compatible replacements. See the discussion in +// Equivalence classes, used to match the Liberation and Ascender fonts +// with their metric-compatible replacements. See the discussion in // GetFontEquivClass(). enum FontEquivClass { @@ -50,11 +50,16 @@ FontEquivClass GetFontEquivClass(const char* fontname) // /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. if (strcasecmp(fontname, "Arial") == 0 || - strcasecmp(fontname, "Liberation Sans") == 0) { + strcasecmp(fontname, "Liberation Sans") == 0 || + strcasecmp(fontname, "Ascender Sans") == 0) { return SANS; } else if (strcasecmp(fontname, "Times New Roman") == 0 || - strcasecmp(fontname, "Liberation Serif") == 0) { + strcasecmp(fontname, "Liberation Serif") == 0 || + strcasecmp(fontname, "Ascender Serif") == 0) { return SERIF; } return OTHER; |