[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

tony at chromium.org tony at chromium.org
Wed Dec 22 13:49:50 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 14981dd0a4f18a16beac56a8d8e36d0c81b92e65
Author: tony at chromium.org <tony at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 28 00:04:44 2010 +0000

    2010-09-27  Tony Chang  <tony at chromium.org>
    
            Reviewed by David Levin.
    
            [chromium] fix detection of missing fonts on DRT
            https://bugs.webkit.org/show_bug.cgi?id=46651
    
            * DumpRenderTree/chromium/TestShellGtk.cpp:
            (setupFontconfig):  Only print an error message if lohit isn't found in both locations.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68451 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 7360d0d..13b5632 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,5 +1,15 @@
 2010-09-27  Tony Chang  <tony at chromium.org>
 
+        Reviewed by David Levin.
+
+        [chromium] fix detection of missing fonts on DRT
+        https://bugs.webkit.org/show_bug.cgi?id=46651
+
+        * DumpRenderTree/chromium/TestShellGtk.cpp:
+        (setupFontconfig):  Only print an error message if lohit isn't found in both locations.
+
+2010-09-27  Tony Chang  <tony at chromium.org>
+
         Reviewed by Dimitri Glazkov.
 
         add webkit unit tests to the chromium testers
diff --git a/WebKitTools/DumpRenderTree/chromium/TestShellGtk.cpp b/WebKitTools/DumpRenderTree/chromium/TestShellGtk.cpp
index 60408b9..1cf7c56 100644
--- a/WebKitTools/DumpRenderTree/chromium/TestShellGtk.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/TestShellGtk.cpp
@@ -134,22 +134,23 @@ static void setupFontconfig()
     // few layout tests.
     static const char* const optionalFonts[] = {
         "/usr/share/fonts/truetype/ttf-lucida/LucidaSansRegular.ttf",
-
-        // This font changed paths across Ubuntu releases.
         "/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_pa.ttf",
-        "/usr/share/fonts/truetype/ttf-punjabi-fonts/lohit_pa.ttf",
     };
     for (size_t i = 0; i < arraysize(optionalFonts); ++i) {
         const char* font = optionalFonts[i];
+
+        // This font changed paths across Ubuntu releases, so try checking in both locations.
+        if (!strcmp(font, "/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_pa.ttf")
+            && access(font, R_OK) < 0)
+            font = "/usr/share/fonts/truetype/ttf-punjabi-fonts/lohit_pa.ttf";
+
         if (access(font, R_OK) < 0) {
             fprintf(stderr, "You are missing %s. Without this, some layout tests may fail. "
                             "See http://code.google.com/p/chromium/wiki/LinuxBuildInstructionsPrerequisites "
                             "for more.\n", font);
-        } else {
-            if (!FcConfigAppFontAddFile(fontcfg, (FcChar8 *) font)) {
-                fprintf(stderr, "Failed to load font %s\n", font);
-                exit(1);
-            }
+        } else if (!FcConfigAppFontAddFile(fontcfg, (FcChar8 *) font)) {
+            fprintf(stderr, "Failed to load font %s\n", font);
+            exit(1);
         }
     }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list