added Isabelle tool wrapper;
authorwenzelm
Fri, 23 Nov 2018 22:05:14 +0100
changeset 69337 aa94b3b5aa0b
parent 69336 14444ea196a0
child 69338 0e3e66197a18
added Isabelle tool wrapper;
src/Pure/System/isabelle_tool.scala
src/Pure/Tools/isabelle_fonts.scala
--- a/src/Pure/System/isabelle_tool.scala	Fri Nov 23 21:50:50 2018 +0100
+++ b/src/Pure/System/isabelle_tool.scala	Fri Nov 23 22:05:14 2018 +0100
@@ -171,5 +171,6 @@
   Build_PolyML.isabelle_tool2,
   Build_Status.isabelle_tool,
   Check_Sources.isabelle_tool,
+  Isabelle_Fonts.isabelle_tool,
   Remote_DMG.isabelle_tool,
   isabelle.vscode.Build_VSCode.isabelle_tool)
--- a/src/Pure/Tools/isabelle_fonts.scala	Fri Nov 23 21:50:50 2018 +0100
+++ b/src/Pure/Tools/isabelle_fonts.scala	Fri Nov 23 22:05:14 2018 +0100
@@ -233,4 +233,33 @@
       ).check
     }
   }
+
+
+  /* Isabelle tool wrapper */
+
+  val isabelle_tool =
+    Isabelle_Tool("build_fonts", "construct Isabelle fonts", args =>
+    {
+      var source_dirs: List[Path] = Nil
+      var target_dir = Path.current
+
+      val getopts = Getopts("""
+Usage: isabelle build_fonts [OPTIONS]
+
+  Options are:
+    -D DIR       target directory (default ".")
+    -d DIR       additional source directory
+
+  Construct Isabelle fonts from Deja Vu font families and Isabelle symbols.
+""",
+        "D:" -> (arg => target_dir = Path.explode(arg)),
+        "d:" -> (arg => source_dirs = source_dirs ::: List(Path.explode(arg))))
+
+      val more_args = getopts(args)
+      if (more_args.nonEmpty) getopts.usage()
+
+      val progress = new Console_Progress
+
+      build_fonts(source_dirs = source_dirs, target_dir = target_dir, progress = progress)
+    })
 }