# HG changeset patch # User wenzelm # Date 1347461664 -7200 # Node ID dbc169ddd4047372c7536a108df627c451d47751 # Parent 8b144338e1a2bd34ef93961c2e14a90bb6000e5b load fonts into JavaFX as well; diff -r 8b144338e1a2 -r dbc169ddd404 src/Pure/System/isabelle_system.scala --- a/src/Pure/System/isabelle_system.scala Wed Sep 12 16:27:44 2012 +0200 +++ b/src/Pure/System/isabelle_system.scala Wed Sep 12 16:54:24 2012 +0200 @@ -11,7 +11,7 @@ import java.util.regex.Pattern import java.util.Locale import java.io.{InputStream, OutputStream, File => JFile, BufferedReader, InputStreamReader, - BufferedWriter, OutputStreamWriter, IOException} + BufferedWriter, OutputStreamWriter, IOException, FileInputStream, BufferedInputStream} import java.awt.{GraphicsEnvironment, Font} import java.awt.font.TextAttribute @@ -297,7 +297,12 @@ def install_fonts() { val ge = GraphicsEnvironment.getLocalGraphicsEnvironment() - for (font <- Path.split(getenv_strict("ISABELLE_FONTS"))) + for (font <- Path.split(getenv_strict("ISABELLE_FONTS"))) { ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, font.file)) + + val stream = new BufferedInputStream(new FileInputStream(font.file)) + try { javafx.scene.text.Font.loadFont(stream, 1.0) } + finally { stream.close } + } } }