MCPcopy Create free account
hub / github.com/PCGen/pcgen / initPrintPreviewFonts

Method initPrintPreviewFonts

code/src/java/pcgen/system/Main.java:371–387  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

369 }
370
371 private static void initPrintPreviewFonts()
372 {
373 GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
374 String fontDir = ConfigurationSettings.getOutputSheetsDir() + File.separator + "fonts" + File.separator
375 + "NotoSans" + File.separator;
376 try
377 {
378 ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, new File(fontDir + "NotoSans-Regular.ttf")));
379 ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, new File(fontDir + "NotoSans-Bold.ttf")));
380 ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, new File(fontDir + "NotoSans-Italic.ttf")));
381 ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, new File(fontDir + "NotoSans-BoldItalic.ttf")));
382 }
383 catch (IOException | FontFormatException ex)
384 {
385 Logging.errorPrint("Unexpected exception loading fonts fo print p", ex);
386 }
387 }
388}

Callers 1

startupWithGUIMethod · 0.95

Calls 2

getOutputSheetsDirMethod · 0.95
errorPrintMethod · 0.95

Tested by

no test coverage detected