--- a/src/Pure/Admin/build_fonts.scala Fri Apr 01 11:51:42 2022 +0200
+++ b/src/Pure/Admin/build_fonts.scala Fri Apr 01 17:06:10 2022 +0200
@@ -7,12 +7,10 @@
package isabelle
-object Build_Fonts
-{
+object Build_Fonts {
/* relevant codepoint ranges */
- object Range
- {
+ object Range {
def base_font: Seq[Int] =
(0x0020 to 0x007e) ++ // ASCII
(0x00a0 to 0x024f) ++ // Latin Extended-A/B
@@ -137,8 +135,8 @@
plain: String = "",
bold: String = "",
italic: String = "",
- bold_italic: String = "")
- {
+ bold_italic: String = ""
+ ) {
val fonts: List[String] =
proper_string(plain).toList :::
proper_string(bold).toList :::
@@ -148,8 +146,7 @@
def get(index: Int): String = fonts(index % fonts.length)
}
- object Family
- {
+ object Family {
def isabelle_symbols: Family =
Family(
plain = "IsabelleSymbols.sfd",
@@ -183,8 +180,7 @@
/* hinting */
// see https://www.freetype.org/ttfautohint/doc/ttfautohint.html
- private def auto_hint(source: Path, target: Path): Unit =
- {
+ private def auto_hint(source: Path, target: Path): Unit = {
Isabelle_System.bash("ttfautohint -i " +
File.bash_path(source) + " " + File.bash_path(target)).check
}
@@ -197,8 +193,7 @@
/* build fonts */
- private def find_file(dirs: List[Path], name: String): Path =
- {
+ private def find_file(dirs: List[Path], name: String): Path = {
val path = Path.explode(name)
dirs.collectFirst({ case dir if (dir + path).is_file => dir + path }) match {
case Some(file) => file
@@ -220,8 +215,8 @@
target_prefix: String = "Isabelle",
target_version: String = "",
target_dir: Path = default_target_dir,
- progress: Progress = new Progress): Unit =
- {
+ progress: Progress = new Progress
+ ): Unit = {
Isabelle_System.require_command("ttfautohint")
progress.echo("Directory " + target_dir)
@@ -243,8 +238,7 @@
val target_names = source_names.update(prefix = target_prefix, version = target_version)
- Isabelle_System.with_tmp_file("font", "ttf")(tmp_file =>
- {
+ Isabelle_System.with_tmp_file("font", "ttf")(tmp_file => {
for (hinted <- hinting) {
val target_file = target_dir + hinted_path(hinted) + target_names.ttf
progress.echo("Font " + target_file.toString + " ...")
@@ -342,8 +336,7 @@
/* Isabelle tool wrapper */
val isabelle_tool =
- Isabelle_Tool("build_fonts", "construct Isabelle fonts", Scala_Project.here, args =>
- {
+ Isabelle_Tool("build_fonts", "construct Isabelle fonts", Scala_Project.here, args => {
var source_dirs: List[Path] = Nil
val getopts = Getopts("""