private int mem_allocated = 0;
private Runtime vm = null;
- private Res loadedStream = null;
+ private Stream loadedStream = null;
- public void loadFontByteStream(Res res) {
+ public void loadFontByteStream(Stream res) {
try {
- Log.log(this, "loading font " + res);
+ Log.info(this, "loading font " + res);
loadedStream = res;
- InputStream is = res.getInputStream();
+ InputStream is = Stream.getInputStream(res);
byte[] fontstream = InputStreamToByteArray.convert(is);
vm = new MIPSApps();
int baseAddr = vm.sbrk(fontstream.length);
vm.execute();
if(vm.getState() == Runtime.DONE) throw new Error("Freetype VM exited: " + vm.exitStatus());
} catch (Exception e) {
- Log.log(this, e);
+ Log.info(this, e);
}
}
vm.copyin(addr, glyph.data, glyph.width * glyph.height);
} catch (Exception e) {
- Log.log(this, e);
+ Log.info(this, e);
}
}
}