diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-18 14:34:30 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-18 14:34:30 +0000 |
commit | 38249475041ab3a1ca68b08670b07335c26c94d7 (patch) | |
tree | 5b3ca8e4637b8d194db5f5d96b70457a60bd99a6 /webkit/tools/test_shell | |
parent | 60b5184a4bdb8f6d26a529a40ec7470bd1dfd994 (diff) | |
download | chromium_src-38249475041ab3a1ca68b08670b07335c26c94d7.zip chromium_src-38249475041ab3a1ca68b08670b07335c26c94d7.tar.gz chromium_src-38249475041ab3a1ca68b08670b07335c26c94d7.tar.bz2 |
Revert 5595
Review URL: http://codereview.chromium.org/11230
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5606 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell')
-rw-r--r-- | webkit/tools/test_shell/test_shell_gtk.cc | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc index b8dab9a..3d62e88 100644 --- a/webkit/tools/test_shell/test_shell_gtk.cc +++ b/webkit/tools/test_shell/test_shell_gtk.cc @@ -6,7 +6,6 @@ #include <errno.h> #include <fcntl.h> -#include <fontconfig/fontconfig.h> #include <gtk/gtk.h> #include <unistd.h> @@ -32,43 +31,6 @@ void TestShell::InitializeTestShell(bool interactive) { window_list_ = new WindowList; web_prefs_ = new WebPreferences; interactive_ = interactive; - - // We wish to make the layout tests reproducable with respect to fonts. Skia - // uses fontconfig to resolve font family names from WebKit into actual font - // files found on the current system. This means that fonts vary based on the - // system and also on the fontconfig configuration. - // - // To avoid this we initialise fontconfig here and install a configuration - // which only knows about a few, select, fonts. - - // This is the list of fonts that fontconfig will know about. It will try its - // best to match based only on the fonts here in. The paths are where these - // fonts are found on our Ubuntu boxes. - static const char *const fonts[] = { - "/usr/share/fonts/truetype/msttcorefonts/Arial.ttf", - "/usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf", - "/usr/share/fonts/truetype/msttcorefonts/Arial_Italic.ttf", - "/usr/share/fonts/truetype/msttcorefonts/Arial_Bold_Italic.ttf", - "/usr/share/fonts/truetype/msttcorefonts/Courier_New.ttf", - "/usr/share/fonts/truetype/msttcorefonts/Courier_New_Italic.ttf", - "/usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold.ttf", - "/usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold_Italic.ttf", - "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf", - "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold.ttf", - "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Italic.ttf", - "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold_Italic.ttf", - NULL - }; - - FcInit(); - FcConfig* fontcfg = FcConfigCreate(); - for (unsigned i = 0; fonts[i]; ++i) { - if (!FcConfigAppFontAddFile(fontcfg, (FcChar8 *) fonts[i])) - LOG(FATAL) << "Failed to load font " << fonts[i]; - } - - if (!FcConfigSetCurrent(fontcfg)) - LOG(FATAL) << "Failed to set the default font configuration"; } // static |