summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-07 00:05:03 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-07 00:05:03 +0000
commitc1c659b50335de695a8e57543d479207a846c8db (patch)
tree98f839edbf349d4dd1aa7e62da1963ad5d2963df
parentb01115731b71c73e6d54fe9a60d57bb91f2c7e06 (diff)
downloadchromium_src-c1c659b50335de695a8e57543d479207a846c8db.zip
chromium_src-c1c659b50335de695a8e57543d479207a846c8db.tar.gz
chromium_src-c1c659b50335de695a8e57543d479207a846c8db.tar.bz2
Make missing Lucida Sans a warning.
Review URL: http://codereview.chromium.org/17219 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7633 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/tools/test_shell/test_shell_gtk.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc
index b4cce51..fd572fd 100644
--- a/webkit/tools/test_shell/test_shell_gtk.cc
+++ b/webkit/tools/test_shell/test_shell_gtk.cc
@@ -98,7 +98,6 @@ void TestShell::InitializeTestShell(bool layout_test_mode) {
"/usr/share/fonts/truetype/msttcorefonts/Verdana_Bold.ttf",
"/usr/share/fonts/truetype/msttcorefonts/Verdana_Bold_Italic.ttf",
"/usr/share/fonts/truetype/msttcorefonts/Verdana_Italic.ttf",
- "/usr/share/fonts/truetype/ttf-lucida/LucidaSansRegular.ttf",
NULL
};
for (size_t i = 0; fonts[i]; ++i) {
@@ -112,6 +111,20 @@ void TestShell::InitializeTestShell(bool layout_test_mode) {
LOG(FATAL) << "Failed to load font " << fonts[i];
}
+ // We special case this font because it's only needed in a few layout tests
+ // and it's in an obscure package (sun-java6-fonts), which pulls in the JDK.
+ const char* const lucida_sans_file =
+ "/usr/share/fonts/truetype/ttf-lucida/LucidaSansRegular.ttf";
+ if (access(lucida_sans_file, R_OK)) {
+ LOG(WARNING) << "You are missing " << lucida_sans_file
+ << ". Without this, some layout tests will fail."
+ << "It's not a major problem. You can get it from the "
+ << "sun-java6-fonts package on Ubuntu.";
+ } else {
+ if (!FcConfigAppFontAddFile(fontcfg, (FcChar8 *) lucida_sans_file))
+ LOG(FATAL) << "Failed to load font " << lucida_sans_file;
+ }
+
// Also load the layout-test-specific "Ahem" font.
FilePath ahem_path = resources_path.Append("AHEM____.TTF");
if (!FcConfigAppFontAddFile(fontcfg, FilePathAsFcChar(ahem_path))) {