[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
mrobinson at webkit.org
mrobinson at webkit.org
Wed Dec 22 13:52:56 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 2c674e65733daca066705a34c5b5262f7e857f81
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Sep 28 20:15:06 2010 +0000
2010-09-28 Martin Robinson <mrobinson at igalia.com>
Reviewed by Gustavo Noronha Silva.
[gtk] Fedora has a different path for the liberation fonts
https://bugs.webkit.org/show_bug.cgi?id=46709
When searching for DRT fonts, also look in the path where those fonts
are commonly found on Fedora systems.
* DumpRenderTree/gtk/DumpRenderTree.cpp:
(initializeFonts): Include logic for looking for Fedora-style font paths.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68554 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 1145a34..1a56b2a 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,5 +1,18 @@
2010-09-28 Martin Robinson <mrobinson at igalia.com>
+ Reviewed by Gustavo Noronha Silva.
+
+ [gtk] Fedora has a different path for the liberation fonts
+ https://bugs.webkit.org/show_bug.cgi?id=46709
+
+ When searching for DRT fonts, also look in the path where those fonts
+ are commonly found on Fedora systems.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (initializeFonts): Include logic for looking for Fedora-style font paths.
+
+2010-09-28 Martin Robinson <mrobinson at igalia.com>
+
Reviewed by Andreas Kling.
run-webkit-tests needs an updated list of directories with webgl tests
diff --git a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
index 07270f5..521a0e1 100644
--- a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
@@ -150,31 +150,54 @@ static void initializeFonts()
if (!FcConfigParseAndLoad(config, reinterpret_cast<FcChar8*>(fontConfigFilename.get()), true))
g_error("Couldn't load font configuration file from: %s", fontConfigFilename.get());
- static const char *const fontPaths[] = {
- "/usr/share/fonts/truetype/ttf-liberation/LiberationMono-BoldItalic.ttf",
- "/usr/share/fonts/truetype/ttf-liberation/LiberationMono-Bold.ttf",
- "/usr/share/fonts/truetype/ttf-liberation/LiberationMono-Italic.ttf",
- "/usr/share/fonts/truetype/ttf-liberation/LiberationMono-Regular.ttf",
- "/usr/share/fonts/truetype/ttf-liberation/LiberationSans-BoldItalic.ttf",
- "/usr/share/fonts/truetype/ttf-liberation/LiberationSans-Bold.ttf",
- "/usr/share/fonts/truetype/ttf-liberation/LiberationSans-Italic.ttf",
- "/usr/share/fonts/truetype/ttf-liberation/LiberationSans-Regular.ttf",
- "/usr/share/fonts/truetype/ttf-liberation/LiberationSerif-BoldItalic.ttf",
- "/usr/share/fonts/truetype/ttf-liberation/LiberationSerif-Bold.ttf",
- "/usr/share/fonts/truetype/ttf-liberation/LiberationSerif-Italic.ttf",
- "/usr/share/fonts/truetype/ttf-liberation/LiberationSerif-Regular.ttf",
- "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf",
+ static const char *const fontPaths[][2] = {
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationMono-BoldItalic.ttf",
+ "/usr/share/fonts/liberation/LiberationMono-BoldItalic.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationMono-Bold.ttf",
+ "/usr/share/fonts/liberation/LiberationMono-Bold.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationMono-Italic.ttf",
+ "/usr/share/fonts/liberation/LiberationMono-Italic.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationMono-Regular.ttf",
+ "/usr/share/fonts/liberation/LiberationMono-Regular.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationSans-BoldItalic.ttf",
+ "/usr/share/fonts/liberation/LiberationSans-BoldItalic.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationSans-Bold.ttf",
+ "/usr/share/fonts/liberation/LiberationSans-Bold.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationSans-Italic.ttf",
+ "/usr/share/fonts/liberation/LiberationSans-Italic.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationSans-Regular.ttf",
+ "/usr/share/fonts/liberation/LiberationSans-Regular.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationSerif-BoldItalic.ttf",
+ "/usr/share/fonts/liberation/LiberationSerif-BoldItalic.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationSerif-Bold.ttf",
+ "/usr/share/fonts/liberation/LiberationSerif-Bold.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationSerif-Italic.ttf",
+ "/usr/share/fonts/liberation/LiberationSerif-Italic.ttf", },
+ { "/usr/share/fonts/truetype/ttf-liberation/LiberationSerif-Regular.ttf",
+ "/usr/share/fonts/liberation/LiberationSerif-Regular.ttf", },
+ { "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf",
+ "/usr/share/fonts/dejavu/DejaVuSans.ttf", },
};
// TODO: Some tests use Lucida. We should load these as well, once it becomes
// clear how to install these fonts easily on Fedora.
- for (size_t i = 0; i < G_N_ELEMENTS(fontPaths); i++) {
- if (!g_file_test(fontPaths[i], G_FILE_TEST_EXISTS))
- g_error("Could not find font at %s. Either install this font or file "
- "a bug at http://bugs.webkit.org if it is installed in another location.",
- fontPaths[i]);
- if (!FcConfigAppFontAddFile(config, reinterpret_cast<const FcChar8*>(fontPaths[i])))
- g_error("Could not load font at %s!", fontPaths[i]);
+ for (size_t font = 0; font < G_N_ELEMENTS(fontPaths); font++) {
+ bool found = false;
+ for (size_t path = 0; path < 2; path++) {
+
+ if (g_file_test(fontPaths[font][path], G_FILE_TEST_EXISTS)) {
+ found = true;
+ if (!FcConfigAppFontAddFile(config, reinterpret_cast<const FcChar8*>(fontPaths[font][path])))
+ g_error("Could not load font at %s!", fontPaths[font][path]);
+ else
+ break;
+ }
+ }
+
+ if (!found)
+ g_error("Could not find font at %s. Either install this font or file a bug "
+ "at http://bugs.webkit.org if it is installed in another location.",
+ fontPaths[font][0]);
}
// Ahem is used by many layout tests.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list