Title: [157191] trunk/Tools
Revision
157191
Author
[email protected]
Date
2013-10-09 15:39:13 -0700 (Wed, 09 Oct 2013)

Log Message

[Win] Check for MathML fonts and warn user if they are missing.
https://bugs.webkit.org/show_bug.cgi?id=122568

Reviewed by Tim Horton.

* Scripts/webkitdirs.pm:
(checkRequiredSystemConfig): Use common gperf/bison/flex tests, rather than
Windows-specific code I added previously.
(fontExists): Added
(checkInstalledTools): Add check for MathML fonts.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (157190 => 157191)


--- trunk/Tools/ChangeLog	2013-10-09 22:32:03 UTC (rev 157190)
+++ trunk/Tools/ChangeLog	2013-10-09 22:39:13 UTC (rev 157191)
@@ -1,3 +1,16 @@
+2013-10-09  Brent Fulgham  <[email protected]>
+
+        [Win] Check for MathML fonts and warn user if they are missing.
+        https://bugs.webkit.org/show_bug.cgi?id=122568
+
+        Reviewed by Tim Horton.
+
+        * Scripts/webkitdirs.pm:
+        (checkRequiredSystemConfig): Use common gperf/bison/flex tests, rather than
+        Windows-specific code I added previously.
+        (fontExists): Added
+        (checkInstalledTools): Add check for MathML fonts.
+
 2013-10-09  Alexey Proskuryakov  <[email protected]>
 
         http://build.webkit.org/dashboard/ doesn't link to webkitpy failures

Modified: trunk/Tools/Scripts/webkitdirs.pm (157190 => 157191)


--- trunk/Tools/Scripts/webkitdirs.pm	2013-10-09 22:32:03 UTC (rev 157190)
+++ trunk/Tools/Scripts/webkitdirs.pm	2013-10-09 22:39:13 UTC (rev 157191)
@@ -1433,7 +1433,7 @@
             print "most likely fail. The latest Xcode is available from the App Store.\n";
             print "*************************************************************\n";
         }
-    } elsif (isGtk() or isEfl()) {
+    } elsif (isGtk() or isEfl() or isWindows()) {
         my @cmds = qw(bison gperf flex);
         my @missing = ();
         my $oldPath = $ENV{PATH};
@@ -1477,12 +1477,15 @@
     return windowsSourceDir() . "\\WebKitBuild";
 }
 
+sub fontExists($)
+{
+    my $font = shift;
+    my $val = system qw(regtool get), '\\HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts\\' . $font . ' (TrueType)';
+    return 0 == $val;
+}
+
 sub checkInstalledTools()
 {
-    # Make sure gperf is installed.
-    my $gperfVer = `gperf --version`;
-    die "You must have gperf installed to build WebKit.\n" if ($?);
-
     # SVN 1.7.10 is known to be compatible with current servers. SVN 1.8.x seems to be missing some authentication
     # protocols we use for svn.webkit.org:
     my $svnVersion = `svn --version | grep "\\sversion"`;
@@ -1497,6 +1500,23 @@
     die "You must have Python installed to build WebKit.\n" if ($?);
     die "Python 2.7.3 is not compatible with the WebKit build. Please downgrade to Python 2.6.8.\n" if ($pythonVer =~ /2\.7\.3/);
 
+    # MathML requires fonts that do not ship with Windows (at least through Windows 8). Warn the user if they are missing
+    my @fonts = qw(STIXGeneral-Regular MathJax_Main-Regular);
+    my @missing = ();
+    foreach my $font (@fonts) {
+        push @missing, $font if not fontExists($font);
+    }
+
+    if (scalar @missing > 0) {
+        print "*************************************************************\n";
+        print "Mathematical fonts, such as STIX and MathJax, are needed to\n";
+        print "use the MathML feature.  You do not appear to have these fonts\n";
+        print "on your system.\n\n";
+        print "You can download a suitable set of fonts from the following URL:\n";
+        print "https://developer.mozilla.org/Mozilla/MathML_Projects/Fonts\n";
+        print "*************************************************************\n";
+    }
+
     print "Installed tools are correct for the WebKit build.\n";
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to