mirror of
https://github.com/badvision/jace.git
synced 2024-11-28 10:52:33 +00:00
Only load font when needed -- this allows the emulator to be more embeddable as a headless appliance
This commit is contained in:
parent
90e09ba53c
commit
905cba8ab7
@ -30,11 +30,17 @@ import javax.imageio.ImageIO;
|
||||
*/
|
||||
public class Font {
|
||||
static public int[][] font;
|
||||
static public boolean initialized = false;
|
||||
static public int getByte(int c, int yOffset) {
|
||||
if (!initialized) {
|
||||
initalize();
|
||||
}
|
||||
return font[c][yOffset];
|
||||
}
|
||||
static {
|
||||
|
||||
private static void initalize() {
|
||||
font = new int[256][8];
|
||||
initialized = true;
|
||||
try {
|
||||
InputStream in = ClassLoader.getSystemResourceAsStream("jace/data/font.gif");
|
||||
BufferedImage fontImage = ImageIO.read(in);
|
||||
|
Loading…
Reference in New Issue
Block a user