0
所有的问题:创建一个字体,其文件的路径是一个URL
我怎么能创建一个字体的文件的字体是一个URL的字体的字体? 因为对于图像,我提出:
URL fond_path_3 = getClass().getResource("/hepta/Images/BoutonQuitter.png");
Image myPicture3 = Toolkit.getDefaultToolkit().getImage(fond_path_3);
但是,现在的文件我不知道如何得到它:
URL font_path = getClass().getResource("/hepta/Images/moolbor.ttf");
newfont = Font.createFont(Font.TRUETYPE_FONT, new FileInputStream(new File(font_path))).deriveFont(Font.PLAIN, 24);
的问题似乎是从:
new FileInputStream(new File(font_path))
谢谢!
貌似工作!谢谢=) – user2057209