2004/01/13 10:27:47
[org.ibex.core.git] / src / org / xwt / translators / Freetype.java
index d9c6904..7fc5447 100644 (file)
@@ -17,13 +17,13 @@ public class Freetype {
     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);
@@ -34,7 +34,7 @@ public class Freetype {
             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);
         }
     }
 
@@ -59,7 +59,7 @@ public class Freetype {
             vm.copyin(addr, glyph.data, glyph.width * glyph.height);
             
         } catch (Exception e) {
-            Log.log(this, e);
+            Log.info(this, e);
         }
     }
 }