equal
deleted
inserted
replaced
295 new Font(family, if (bold) Font.BOLD else Font.PLAIN, size) |
295 new Font(family, if (bold) Font.BOLD else Font.PLAIN, size) |
296 |
296 |
297 def install_fonts() |
297 def install_fonts() |
298 { |
298 { |
299 val ge = GraphicsEnvironment.getLocalGraphicsEnvironment() |
299 val ge = GraphicsEnvironment.getLocalGraphicsEnvironment() |
|
300 for (font <- Path.split(getenv_strict("ISABELLE_FONTS"))) |
|
301 ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, font.file)) |
|
302 } |
|
303 |
|
304 def install_fonts_jfx() |
|
305 { |
300 for (font <- Path.split(getenv_strict("ISABELLE_FONTS"))) { |
306 for (font <- Path.split(getenv_strict("ISABELLE_FONTS"))) { |
301 ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, font.file)) |
|
302 |
|
303 val stream = new BufferedInputStream(new FileInputStream(font.file)) |
307 val stream = new BufferedInputStream(new FileInputStream(font.file)) |
304 try { javafx.scene.text.Font.loadFont(stream, 1.0) } |
308 try { javafx.scene.text.Font.loadFont(stream, 1.0) } |
305 finally { stream.close } |
309 finally { stream.close } |
306 } |
310 } |
307 } |
311 } |