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

Unified Diff: webkit/tools/test_shell/test_shell_gtk.cc

Issue 11284: Match Windows font metrics on Linux. (Closed)
Patch Set: Addressing comments Created 12 years, 1 month 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 | « webkit/tools/test_shell/resources/linux-fontconfig-config ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell_gtk.cc
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc
index 75c9e3865c7db57c78c17099f311369b6ad424ef..c03452d1b6150382b89dcf626992fb555b947804 100644
--- a/webkit/tools/test_shell/test_shell_gtk.cc
+++ b/webkit/tools/test_shell/test_shell_gtk.cc
@@ -61,8 +61,21 @@ void TestShell::InitializeTestShell(bool interactive) {
NULL
};
+ // We have fontconfig parse a config file from our resources directory. This
+ // sets a number of aliases ("sans"->"Arial" etc), but doesn't include any
+ // font directories.
+ FilePath path;
+ PathService::Get(base::DIR_SOURCE_ROOT, &path);
+ path.Append("webkti/tools/test_shell/resources/linux-fontconfig-config");
+
FcInit();
+
FcConfig* fontcfg = FcConfigCreate();
+ if (!FcConfigParseAndLoad(fontcfg, (const FcChar8*) path.value().c_str(),
+ true)) {
+ LOG(FATAL) << "Failed to parse fontconfig config file";
+ }
+
for (unsigned i = 0; fonts[i]; ++i) {
if (access(fonts[i], R_OK)) {
LOG(FATAL) << "You are missing " << fonts[i] << ". "
« no previous file with comments | « webkit/tools/test_shell/resources/linux-fontconfig-config ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698