This site requires JavaScript, please enable it in your browser!
Greenfoot back
joris0127
joris0127 wrote ...

2014/2/24

Importing a font

joris0127 joris0127

2014/2/24

#
So i use this font for my layout but it isn't a standart font. I have to import it from a file only it doesn't work. The file is in my game map. This is my code:
import java.awt.*;
import java.io.*;
(...)
Font font = Font.createFont(Font.TRUETYPE_FONT, new File("A.ttf"));
You need to login to post a reply.