--- 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 }
+ }
}
}