OSDN Git Service

[fixed] AndroidFileHandle http://www.badlogicgames.com/forum/viewtopic.php?f=11&t...
authorbadlogicgames <badlogicgames@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Tue, 16 Nov 2010 15:53:48 +0000 (15:53 +0000)
committerbadlogicgames <badlogicgames@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Tue, 16 Nov 2010 15:53:48 +0000 (15:53 +0000)
[added] Files.getExternalStoragePath() and Files.isExternalStoragetPathAvailable()
[added] FilesTest

backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidFileHandle.java
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidFiles.java
backends/gdx-backend-jogl/src/com/badlogic/gdx/backends/jogl/JoglFiles.java
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglFiles.java
gdx/src/com/badlogic/gdx/Files.java
gdx/src/com/badlogic/gdx/utils/arial-15.fnt
gdx/src/com/badlogic/gdx/utils/arial-15.png
tests/gdx-tests/src/com/badlogic/gdx/tests/FilesTest.java [new file with mode: 0644]
tests/gdx-tests/src/com/badlogic/gdx/tests/utils/GdxTests.java

index 8d5c26d..3ccb16b 100644 (file)
 \r
 package com.badlogic.gdx.backends.android;\r
 \r
+import java.io.FileInputStream;\r
 import java.io.IOException;\r
 import java.io.InputStream;\r
 \r
 import android.content.res.AssetManager;\r
 \r
+import com.badlogic.gdx.Files.FileType;\r
 import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
 \r
 /**\r
- * A {@link FileHandle} implementation for Android. Encapsulates assets and files on the external storage device.\r
+ * A {@link FileHandle} implementation for Android. Encapsulates assets and\r
+ * files on the external storage device.\r
  * \r
  * @author mzechner\r
  * \r
@@ -32,43 +35,47 @@ public class AndroidFileHandle implements FileHandle {
        private final AssetManager manager;\r
 \r
        /** the filename **/\r
-       private final String filename;\r
+       private final String filename;  \r
 \r
-       AndroidFileHandle (AssetManager manager, String filename) {\r
+       AndroidFileHandle(AssetManager manager, String filename) {\r
                this.manager = manager;\r
-               this.filename = filename;\r
+               this.filename = filename;               \r
        }\r
 \r
        /**\r
         * @return whether this is an asset file or an external file\r
         */\r
-       public boolean isAsset () {\r
+       public boolean isAsset() {\r
                return manager != null;\r
        }\r
 \r
        /**\r
         * @return the {@link AssetManager} or null\r
         */\r
-       public AssetManager getAssetManager () {\r
+       public AssetManager getAssetManager() {\r
                return manager;\r
        }\r
 \r
        /**\r
         * @return the filename\r
         */\r
-       public String getPath () {\r
+       public String getPath() {\r
                return filename;\r
        }\r
 \r
-       public InputStream readFile () {\r
+       public InputStream readFile() {\r
                try {\r
-                       return manager.open(filename);\r
+                       if (manager!=null) {\r
+                               return manager.open(filename);\r
+                       } else {\r
+                               return new FileInputStream(filename);\r
+                       }\r
                } catch (IOException ex) {\r
                        throw new GdxRuntimeException("Error reading file: " + filename);\r
                }\r
        }\r
 \r
-       public String toString () {\r
+       public String toString() {\r
                return filename;\r
        }\r
 }\r
index 63c1997..67ebae8 100644 (file)
@@ -193,4 +193,14 @@ public class AndroidFiles implements Files {
                        return out;\r
                }\r
        }\r
+\r
+       @Override\r
+       public String getExternalStoragePath() {\r
+               return sdcard;\r
+       }\r
+\r
+       @Override\r
+       public boolean isExternalStorageAvailable() {\r
+               return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);\r
+       }\r
 }\r
index 0c89c15..acd5dfa 100644 (file)
@@ -90,4 +90,14 @@ final class JoglFiles implements Files {
                        throw new GdxRuntimeException("File not found: " + fileName + " (" + type + ")");\r
                }\r
        }\r
+\r
+       @Override\r
+       public String getExternalStoragePath() {\r
+               return externalPath;\r
+       }\r
+\r
+       @Override\r
+       public boolean isExternalStorageAvailable() {\r
+               return true;\r
+       }\r
 }\r
index 3801412..37a9c88 100644 (file)
@@ -95,4 +95,14 @@ final class LwjglFiles implements Files {
                        throw new GdxRuntimeException("File not found: " + fileName + " (" + type + ")");\r
                }\r
        }\r
+\r
+       @Override\r
+       public String getExternalStoragePath() {\r
+               return externalPath;\r
+       }\r
+\r
+       @Override\r
+       public boolean isExternalStorageAvailable() {\r
+               return true;\r
+       }\r
 }\r
index 21ff3ee..ffc7741 100644 (file)
@@ -161,4 +161,14 @@ public interface Files {
         *             if the file does not exist\r
         */\r
        public FileHandle getFileHandle(String filename, FileType type);\r
+       \r
+       /**\r
+        * @return the external storage path directory, e.g. /sdcard/ on Android or /home/mzechner/ on the desktop.\r
+        */\r
+       public String getExternalStoragePath();\r
+       \r
+       /**\r
+        * @return whether the external storage is available for file i/o\r
+        */\r
+       public boolean isExternalStorageAvailable();\r
 }\r
index 447afda..21f3967 100644 (file)
@@ -3,199 +3,205 @@ common lineHeight=18 base=14 scaleW=256 scaleH=256 pages=1 packed=0
 page id=0 file="arial-15.png"\r
 chars count=189\r
 char id=32   x=0     y=0     width=0     height=0     xoffset=0     yoffset=14    xadvance=4     page=0  chnl=0 \r
-char id=254   x=0     y=0     width=8     height=16     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=253   x=8     y=0     width=10     height=16     xoffset=-1     yoffset=2    xadvance=7     page=0  chnl=0 \r
-char id=221   x=18     y=0     width=10     height=16     xoffset=0     yoffset=-1    xadvance=9     page=0  chnl=0 \r
-char id=219   x=28     y=0     width=10     height=16     xoffset=1     yoffset=-1    xadvance=10     page=0  chnl=0 \r
-char id=218   x=38     y=0     width=10     height=16     xoffset=1     yoffset=-1    xadvance=10     page=0  chnl=0 \r
-char id=217   x=48     y=0     width=10     height=16     xoffset=1     yoffset=-1    xadvance=10     page=0  chnl=0 \r
-char id=213   x=58     y=0     width=12     height=16     xoffset=1     yoffset=-1    xadvance=12     page=0  chnl=0 \r
-char id=212   x=70     y=0     width=12     height=16     xoffset=1     yoffset=-1    xadvance=12     page=0  chnl=0 \r
-char id=211   x=82     y=0     width=12     height=16     xoffset=1     yoffset=-1    xadvance=12     page=0  chnl=0 \r
-char id=210   x=94     y=0     width=12     height=16     xoffset=1     yoffset=-1    xadvance=12     page=0  chnl=0 \r
-char id=209   x=106     y=0     width=10     height=16     xoffset=1     yoffset=-1    xadvance=10     page=0  chnl=0 \r
-char id=206   x=116     y=0     width=8     height=16     xoffset=-1     yoffset=-1    xadvance=3     page=0  chnl=0 \r
-char id=205   x=124     y=0     width=3     height=16     xoffset=1     yoffset=-1    xadvance=3     page=0  chnl=0 \r
-char id=204   x=127     y=0     width=4     height=16     xoffset=0     yoffset=-1    xadvance=3     page=0  chnl=0 \r
-char id=202   x=131     y=0     width=10     height=16     xoffset=1     yoffset=-1    xadvance=10     page=0  chnl=0 \r
-char id=201   x=141     y=0     width=10     height=16     xoffset=1     yoffset=-1    xadvance=10     page=0  chnl=0 \r
-char id=200   x=151     y=0     width=10     height=16     xoffset=1     yoffset=-1    xadvance=10     page=0  chnl=0 \r
-char id=199   x=161     y=0     width=10     height=16     xoffset=1     yoffset=2    xadvance=11     page=0  chnl=0 \r
-char id=195   x=171     y=0     width=13     height=16     xoffset=-1     yoffset=-1    xadvance=9     page=0  chnl=0 \r
-char id=194   x=184     y=0     width=13     height=16     xoffset=-1     yoffset=-1    xadvance=9     page=0  chnl=0 \r
-char id=193   x=197     y=0     width=13     height=16     xoffset=-1     yoffset=-1    xadvance=9     page=0  chnl=0 \r
-char id=192   x=210     y=0     width=13     height=16     xoffset=-1     yoffset=-1    xadvance=9     page=0  chnl=0 \r
-char id=182   x=223     y=0     width=10     height=16     xoffset=0     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=166   x=233     y=0     width=3     height=16     xoffset=1     yoffset=2    xadvance=3     page=0  chnl=0 \r
-char id=162   x=236     y=0     width=7     height=16     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=64   x=0     y=16     width=16     height=16     xoffset=0     yoffset=2    xadvance=15     page=0  chnl=0 \r
-char id=124   x=16     y=16     width=3     height=16     xoffset=1     yoffset=2    xadvance=3     page=0  chnl=0 \r
-char id=125   x=19     y=16     width=7     height=16     xoffset=0     yoffset=2    xadvance=5     page=0  chnl=0 \r
-char id=123   x=26     y=16     width=7     height=16     xoffset=0     yoffset=2    xadvance=5     page=0  chnl=0 \r
-char id=93   x=33     y=16     width=5     height=16     xoffset=0     yoffset=2    xadvance=4     page=0  chnl=0 \r
-char id=91   x=38     y=16     width=5     height=16     xoffset=1     yoffset=2    xadvance=4     page=0  chnl=0 \r
-char id=41   x=43     y=16     width=4     height=16     xoffset=1     yoffset=2    xadvance=5     page=0  chnl=0 \r
-char id=40   x=47     y=16     width=4     height=16     xoffset=1     yoffset=2    xadvance=5     page=0  chnl=0 \r
-char id=106   x=51     y=16     width=5     height=16     xoffset=-1     yoffset=2    xadvance=3     page=0  chnl=0 \r
-char id=255   x=56     y=16     width=10     height=15     xoffset=-1     yoffset=3    xadvance=7     page=0  chnl=0 \r
-char id=220   x=66     y=16     width=10     height=15     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
-char id=214   x=76     y=16     width=12     height=15     xoffset=1     yoffset=0    xadvance=12     page=0  chnl=0 \r
-char id=207   x=88     y=16     width=6     height=15     xoffset=0     yoffset=0    xadvance=3     page=0  chnl=0 \r
-char id=203   x=94     y=16     width=10     height=15     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
-char id=197   x=104     y=16     width=13     height=15     xoffset=-1     yoffset=0    xadvance=9     page=0  chnl=0 \r
-char id=196   x=117     y=16     width=13     height=15     xoffset=-1     yoffset=0    xadvance=9     page=0  chnl=0 \r
-char id=167   x=130     y=16     width=9     height=15     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0 \r
-char id=36   x=139     y=16     width=9     height=15     xoffset=0     yoffset=1    xadvance=8     page=0  chnl=0 \r
-char id=229   x=148     y=16     width=8     height=14     xoffset=1     yoffset=1    xadvance=8     page=0  chnl=0 \r
-char id=216   x=156     y=16     width=12     height=14     xoffset=1     yoffset=2    xadvance=12     page=0  chnl=0 \r
-char id=81   x=168     y=16     width=11     height=14     xoffset=1     yoffset=2    xadvance=12     page=0  chnl=0 \r
-char id=251   x=179     y=16     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=250   x=187     y=16     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=249   x=195     y=16     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=245   x=203     y=16     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=244   x=211     y=16     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=243   x=219     y=16     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=242   x=227     y=16     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=241   x=235     y=16     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=240   x=243     y=16     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=238   x=0     y=32     width=8     height=13     xoffset=-1     yoffset=2    xadvance=3     page=0  chnl=0 \r
-char id=237   x=8     y=32     width=3     height=13     xoffset=1     yoffset=2    xadvance=3     page=0  chnl=0 \r
-char id=236   x=11     y=32     width=4     height=13     xoffset=0     yoffset=2    xadvance=3     page=0  chnl=0 \r
-char id=234   x=15     y=32     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=233   x=23     y=32     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=232   x=31     y=32     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=231   x=39     y=32     width=7     height=13     xoffset=1     yoffset=5    xadvance=8     page=0  chnl=0 \r
-char id=227   x=46     y=32     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=226   x=54     y=32     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=225   x=62     y=32     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=224   x=70     y=32     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=223   x=78     y=32     width=9     height=13     xoffset=1     yoffset=2    xadvance=9     page=0  chnl=0 \r
-char id=222   x=87     y=32     width=10     height=13     xoffset=1     yoffset=2    xadvance=10     page=0  chnl=0 \r
-char id=208   x=97     y=32     width=12     height=13     xoffset=0     yoffset=2    xadvance=11     page=0  chnl=0 \r
-char id=198   x=109     y=32     width=17     height=13     xoffset=-1     yoffset=2    xadvance=15     page=0  chnl=0 \r
-char id=191   x=126     y=32     width=8     height=13     xoffset=1     yoffset=5    xadvance=9     page=0  chnl=0 \r
-char id=190   x=134     y=32     width=15     height=13     xoffset=0     yoffset=2    xadvance=13     page=0  chnl=0 \r
-char id=189   x=149     y=32     width=14     height=13     xoffset=1     yoffset=2    xadvance=13     page=0  chnl=0 \r
-char id=188   x=163     y=32     width=14     height=13     xoffset=1     yoffset=2    xadvance=13     page=0  chnl=0 \r
-char id=181   x=177     y=32     width=8     height=13     xoffset=1     yoffset=5    xadvance=8     page=0  chnl=0 \r
-char id=174   x=185     y=32     width=13     height=13     xoffset=0     yoffset=2    xadvance=11     page=0  chnl=0 \r
-char id=169   x=198     y=32     width=13     height=13     xoffset=0     yoffset=2    xadvance=11     page=0  chnl=0 \r
-char id=165   x=211     y=32     width=9     height=13     xoffset=0     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=161   x=220     y=32     width=3     height=13     xoffset=2     yoffset=5    xadvance=5     page=0  chnl=0 \r
-char id=38   x=223     y=32     width=10     height=13     xoffset=1     yoffset=2    xadvance=10     page=0  chnl=0 \r
-char id=35   x=233     y=32     width=10     height=13     xoffset=0     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=37   x=0     y=45     width=13     height=13     xoffset=1     yoffset=2    xadvance=13     page=0  chnl=0 \r
-char id=92   x=13     y=45     width=5     height=13     xoffset=0     yoffset=2    xadvance=4     page=0  chnl=0 \r
-char id=47   x=18     y=45     width=5     height=13     xoffset=0     yoffset=2    xadvance=4     page=0  chnl=0 \r
-char id=59   x=23     y=45     width=3     height=13     xoffset=1     yoffset=5    xadvance=4     page=0  chnl=0 \r
-char id=63   x=26     y=45     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=33   x=34     y=45     width=3     height=13     xoffset=2     yoffset=2    xadvance=5     page=0  chnl=0 \r
-char id=57   x=37     y=45     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=56   x=45     y=45     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=55   x=53     y=45     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=53   x=61     y=45     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=52   x=69     y=45     width=9     height=13     xoffset=0     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=49   x=78     y=45     width=5     height=13     xoffset=2     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=121   x=83     y=45     width=10     height=13     xoffset=-1     yoffset=5    xadvance=7     page=0  chnl=0 \r
-char id=113   x=93     y=45     width=8     height=13     xoffset=1     yoffset=5    xadvance=8     page=0  chnl=0 \r
-char id=112   x=101     y=45     width=8     height=13     xoffset=1     yoffset=5    xadvance=8     page=0  chnl=0 \r
-char id=108   x=109     y=45     width=3     height=13     xoffset=1     yoffset=2    xadvance=3     page=0  chnl=0 \r
-char id=107   x=112     y=45     width=7     height=13     xoffset=1     yoffset=2    xadvance=7     page=0  chnl=0 \r
-char id=105   x=119     y=45     width=3     height=13     xoffset=1     yoffset=2    xadvance=3     page=0  chnl=0 \r
-char id=104   x=122     y=45     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=103   x=130     y=45     width=8     height=13     xoffset=1     yoffset=5    xadvance=8     page=0  chnl=0 \r
-char id=102   x=138     y=45     width=6     height=13     xoffset=0     yoffset=2    xadvance=4     page=0  chnl=0 \r
-char id=100   x=144     y=45     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=98   x=152     y=45     width=8     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=90   x=160     y=45     width=10     height=13     xoffset=0     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=89   x=170     y=45     width=10     height=13     xoffset=0     yoffset=2    xadvance=9     page=0  chnl=0 \r
-char id=88   x=180     y=45     width=10     height=13     xoffset=0     yoffset=2    xadvance=9     page=0  chnl=0 \r
-char id=87   x=190     y=45     width=16     height=13     xoffset=0     yoffset=2    xadvance=15     page=0  chnl=0 \r
-char id=86   x=206     y=45     width=12     height=13     xoffset=-1     yoffset=2    xadvance=9     page=0  chnl=0 \r
-char id=85   x=218     y=45     width=10     height=13     xoffset=1     yoffset=2    xadvance=10     page=0  chnl=0 \r
-char id=84   x=228     y=45     width=11     height=13     xoffset=0     yoffset=2    xadvance=9     page=0  chnl=0 \r
-char id=83   x=239     y=45     width=10     height=13     xoffset=1     yoffset=2    xadvance=10     page=0  chnl=0 \r
-char id=82   x=0     y=58     width=10     height=13     xoffset=1     yoffset=2    xadvance=11     page=0  chnl=0 \r
-char id=80   x=10     y=58     width=10     height=13     xoffset=1     yoffset=2    xadvance=10     page=0  chnl=0 \r
-char id=79   x=20     y=58     width=12     height=13     xoffset=1     yoffset=2    xadvance=12     page=0  chnl=0 \r
-char id=78   x=32     y=58     width=10     height=13     xoffset=1     yoffset=2    xadvance=10     page=0  chnl=0 \r
-char id=76   x=42     y=58     width=9     height=13     xoffset=1     yoffset=2    xadvance=8     page=0  chnl=0 \r
-char id=75   x=51     y=58     width=10     height=13     xoffset=1     yoffset=2    xadvance=10     page=0  chnl=0 \r
-char id=74   x=61     y=58     width=8     height=13     xoffset=0     yoffset=2    xadvance=7     page=0  chnl=0 \r
-char id=73   x=69     y=58     width=3     height=13     xoffset=1     yoffset=2    xadvance=3     page=0  chnl=0 \r
-char id=72   x=72     y=58     width=10     height=13     xoffset=1     yoffset=2    xadvance=10     page=0  chnl=0 \r
-char id=71   x=82     y=58     width=11     height=13     xoffset=1     yoffset=2    xadvance=11     page=0  chnl=0 \r
-char id=70   x=93     y=58     width=9     height=13     xoffset=1     yoffset=2    xadvance=9     page=0  chnl=0 \r
-char id=69   x=102     y=58     width=10     height=13     xoffset=1     yoffset=2    xadvance=10     page=0  chnl=0 \r
-char id=68   x=112     y=58     width=11     height=13     xoffset=1     yoffset=2    xadvance=11     page=0  chnl=0 \r
-char id=67   x=123     y=58     width=10     height=13     xoffset=1     yoffset=2    xadvance=11     page=0  chnl=0 \r
-char id=66   x=133     y=58     width=9     height=13     xoffset=1     yoffset=2    xadvance=10     page=0  chnl=0 \r
-char id=65   x=142     y=58     width=13     height=13     xoffset=-1     yoffset=2    xadvance=9     page=0  chnl=0 \r
-char id=252   x=155     y=58     width=8     height=12     xoffset=1     yoffset=3    xadvance=8     page=0  chnl=0 \r
-char id=246   x=163     y=58     width=8     height=12     xoffset=1     yoffset=3    xadvance=8     page=0  chnl=0 \r
-char id=239   x=171     y=58     width=6     height=12     xoffset=0     yoffset=3    xadvance=3     page=0  chnl=0 \r
-char id=235   x=177     y=58     width=8     height=12     xoffset=1     yoffset=3    xadvance=8     page=0  chnl=0 \r
-char id=228   x=185     y=58     width=8     height=12     xoffset=1     yoffset=3    xadvance=8     page=0  chnl=0 \r
-char id=163   x=193     y=58     width=9     height=12     xoffset=0     yoffset=3    xadvance=8     page=0  chnl=0 \r
-char id=48   x=202     y=58     width=8     height=12     xoffset=1     yoffset=3    xadvance=8     page=0  chnl=0 \r
-char id=54   x=210     y=58     width=8     height=12     xoffset=1     yoffset=3    xadvance=8     page=0  chnl=0 \r
-char id=51   x=218     y=58     width=8     height=12     xoffset=1     yoffset=3    xadvance=8     page=0  chnl=0 \r
-char id=50   x=226     y=58     width=8     height=12     xoffset=1     yoffset=3    xadvance=8     page=0  chnl=0 \r
-char id=116   x=234     y=58     width=6     height=12     xoffset=0     yoffset=3    xadvance=4     page=0  chnl=0 \r
-char id=77   x=240     y=58     width=11     height=12     xoffset=1     yoffset=3    xadvance=11     page=0  chnl=0 \r
-char id=177   x=0     y=71     width=9     height=11     xoffset=1     yoffset=4    xadvance=8     page=0  chnl=0 \r
-char id=127   x=9     y=71     width=10     height=11     xoffset=1     yoffset=4    xadvance=11     page=0  chnl=0 \r
-char id=230   x=19     y=71     width=14     height=10     xoffset=1     yoffset=5    xadvance=13     page=0  chnl=0 \r
-char id=58   x=33     y=71     width=3     height=10     xoffset=1     yoffset=5    xadvance=4     page=0  chnl=0 \r
-char id=122   x=36     y=71     width=8     height=10     xoffset=1     yoffset=5    xadvance=8     page=0  chnl=0 \r
-char id=120   x=44     y=71     width=8     height=10     xoffset=0     yoffset=5    xadvance=7     page=0  chnl=0 \r
-char id=119   x=52     y=71     width=12     height=10     xoffset=0     yoffset=5    xadvance=11     page=0  chnl=0 \r
-char id=118   x=64     y=71     width=10     height=10     xoffset=-1     yoffset=5    xadvance=7     page=0  chnl=0 \r
-char id=117   x=74     y=71     width=8     height=10     xoffset=1     yoffset=5    xadvance=8     page=0  chnl=0 \r
-char id=115   x=82     y=71     width=8     height=10     xoffset=1     yoffset=5    xadvance=8     page=0  chnl=0 \r
-char id=114   x=90     y=71     width=5     height=10     xoffset=1     yoffset=5    xadvance=5     page=0  chnl=0 \r
-char id=110   x=95     y=71     width=8     height=10     xoffset=1     yoffset=5    xadvance=8     page=0  chnl=0 \r
-char id=109   x=103     y=71     width=13     height=10     xoffset=1     yoffset=5    xadvance=13     page=0  chnl=0 \r
-char id=99   x=116     y=71     width=7     height=10     xoffset=1     yoffset=5    xadvance=8     page=0  chnl=0 \r
-char id=97   x=123     y=71     width=8     height=10     xoffset=1     yoffset=5    xadvance=8     page=0  chnl=0 \r
-char id=248   x=131     y=71     width=8     height=9     xoffset=1     yoffset=6    xadvance=8     page=0  chnl=0 \r
-char id=187   x=139     y=71     width=8     height=9     xoffset=1     yoffset=5    xadvance=8     page=0  chnl=0 \r
-char id=171   x=147     y=71     width=7     height=9     xoffset=1     yoffset=5    xadvance=8     page=0  chnl=0 \r
-char id=43   x=154     y=71     width=9     height=9     xoffset=1     yoffset=4    xadvance=9     page=0  chnl=0 \r
-char id=111   x=163     y=71     width=8     height=9     xoffset=1     yoffset=6    xadvance=8     page=0  chnl=0 \r
-char id=101   x=171     y=71     width=8     height=9     xoffset=1     yoffset=6    xadvance=8     page=0  chnl=0 \r
-char id=215   x=179     y=71     width=9     height=8     xoffset=1     yoffset=5    xadvance=9     page=0  chnl=0 \r
-char id=186   x=188     y=71     width=7     height=8     xoffset=0     yoffset=2    xadvance=5     page=0  chnl=0 \r
-char id=185   x=195     y=71     width=5     height=8     xoffset=1     yoffset=2    xadvance=5     page=0  chnl=0 \r
-char id=179   x=200     y=71     width=6     height=8     xoffset=0     yoffset=2    xadvance=5     page=0  chnl=0 \r
-char id=178   x=206     y=71     width=7     height=8     xoffset=0     yoffset=2    xadvance=5     page=0  chnl=0 \r
-char id=170   x=213     y=71     width=7     height=8     xoffset=0     yoffset=2    xadvance=5     page=0  chnl=0 \r
-char id=94   x=220     y=71     width=7     height=8     xoffset=0     yoffset=2    xadvance=5     page=0  chnl=0 \r
-char id=62   x=227     y=71     width=9     height=8     xoffset=1     yoffset=5    xadvance=9     page=0  chnl=0 \r
-char id=60   x=236     y=71     width=9     height=8     xoffset=1     yoffset=5    xadvance=9     page=0  chnl=0 \r
-char id=247   x=245     y=71     width=9     height=7     xoffset=1     yoffset=5    xadvance=8     page=0  chnl=0 \r
-char id=164   x=0     y=82     width=9     height=7     xoffset=0     yoffset=6    xadvance=8     page=0  chnl=0 \r
-char id=42   x=9     y=82     width=6     height=7     xoffset=0     yoffset=2    xadvance=6     page=0  chnl=0 \r
-char id=61   x=15     y=82     width=9     height=7     xoffset=1     yoffset=5    xadvance=9     page=0  chnl=0 \r
-char id=172   x=24     y=82     width=9     height=6     xoffset=1     yoffset=6    xadvance=9     page=0  chnl=0 \r
-char id=44   x=33     y=82     width=3     height=6     xoffset=2     yoffset=12    xadvance=4     page=0  chnl=0 \r
-char id=39   x=36     y=82     width=3     height=6     xoffset=1     yoffset=2    xadvance=3     page=0  chnl=0 \r
-char id=34   x=39     y=82     width=5     height=6     xoffset=1     yoffset=2    xadvance=5     page=0  chnl=0 \r
-char id=184   x=44     y=82     width=4     height=5     xoffset=1     yoffset=13    xadvance=5     page=0  chnl=0 \r
-char id=176   x=48     y=82     width=5     height=5     xoffset=1     yoffset=3    xadvance=6     page=0  chnl=0 \r
-char id=180   x=53     y=82     width=3     height=4     xoffset=2     yoffset=2    xadvance=5     page=0  chnl=0 \r
-char id=126   x=56     y=82     width=10     height=4     xoffset=0     yoffset=7    xadvance=9     page=0  chnl=0 \r
-char id=96   x=66     y=82     width=3     height=4     xoffset=1     yoffset=2    xadvance=5     page=0  chnl=0 \r
-char id=183   x=69     y=82     width=3     height=3     xoffset=2     yoffset=7    xadvance=5     page=0  chnl=0 \r
-char id=175   x=72     y=82     width=10     height=3     xoffset=0     yoffset=1    xadvance=8     page=0  chnl=0 \r
-char id=168   x=82     y=82     width=5     height=3     xoffset=1     yoffset=2    xadvance=5     page=0  chnl=0 \r
-char id=95   x=87     y=82     width=10     height=3     xoffset=0     yoffset=15    xadvance=8     page=0  chnl=0 \r
-char id=45   x=97     y=82     width=6     height=3     xoffset=0     yoffset=9    xadvance=5     page=0  chnl=0 \r
-char id=46   x=103     y=82     width=3     height=3     xoffset=2     yoffset=12    xadvance=4     page=0  chnl=0 \r
+char id=255   x=0     y=0     width=8     height=19     xoffset=-1     yoffset=0    xadvance=7     page=0  chnl=0 \r
+char id=254   x=8     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=253   x=17     y=0     width=8     height=19     xoffset=-1     yoffset=0    xadvance=7     page=0  chnl=0 \r
+char id=252   x=25     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=251   x=34     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=250   x=43     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=249   x=52     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=248   x=61     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=247   x=70     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=246   x=79     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=245   x=88     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=244   x=97     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=243   x=106     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=242   x=115     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=241   x=124     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=240   x=133     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=239   x=142     y=0     width=5     height=19     xoffset=0     yoffset=0    xadvance=3     page=0  chnl=0 \r
+char id=238   x=147     y=0     width=5     height=19     xoffset=-1     yoffset=0    xadvance=3     page=0  chnl=0 \r
+char id=237   x=152     y=0     width=4     height=19     xoffset=1     yoffset=0    xadvance=3     page=0  chnl=0 \r
+char id=236   x=156     y=0     width=4     height=19     xoffset=0     yoffset=0    xadvance=3     page=0  chnl=0 \r
+char id=235   x=160     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=234   x=169     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=233   x=178     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=232   x=187     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=231   x=196     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=230   x=205     y=0     width=14     height=19     xoffset=1     yoffset=0    xadvance=13     page=0  chnl=0 \r
+char id=229   x=219     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=228   x=228     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=227   x=237     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=226   x=246     y=0     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=225   x=0     y=19     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=224   x=9     y=19     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=223   x=18     y=19     width=10     height=19     xoffset=1     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=222   x=28     y=19     width=11     height=19     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
+char id=221   x=39     y=19     width=10     height=19     xoffset=0     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=220   x=49     y=19     width=11     height=19     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
+char id=219   x=60     y=19     width=11     height=19     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
+char id=218   x=71     y=19     width=11     height=19     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
+char id=217   x=82     y=19     width=11     height=19     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
+char id=216   x=93     y=19     width=13     height=19     xoffset=1     yoffset=0    xadvance=12     page=0  chnl=0 \r
+char id=215   x=106     y=19     width=10     height=19     xoffset=1     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=214   x=116     y=19     width=13     height=19     xoffset=1     yoffset=0    xadvance=12     page=0  chnl=0 \r
+char id=213   x=129     y=19     width=13     height=19     xoffset=1     yoffset=0    xadvance=12     page=0  chnl=0 \r
+char id=212   x=142     y=19     width=13     height=19     xoffset=1     yoffset=0    xadvance=12     page=0  chnl=0 \r
+char id=211   x=155     y=19     width=13     height=19     xoffset=1     yoffset=0    xadvance=12     page=0  chnl=0 \r
+char id=210   x=168     y=19     width=13     height=19     xoffset=1     yoffset=0    xadvance=12     page=0  chnl=0 \r
+char id=209   x=181     y=19     width=11     height=19     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
+char id=208   x=192     y=19     width=12     height=19     xoffset=0     yoffset=0    xadvance=11     page=0  chnl=0 \r
+char id=207   x=204     y=19     width=5     height=19     xoffset=0     yoffset=0    xadvance=3     page=0  chnl=0 \r
+char id=206   x=209     y=19     width=5     height=19     xoffset=-1     yoffset=0    xadvance=3     page=0  chnl=0 \r
+char id=205   x=214     y=19     width=4     height=19     xoffset=1     yoffset=0    xadvance=3     page=0  chnl=0 \r
+char id=204   x=218     y=19     width=4     height=19     xoffset=0     yoffset=0    xadvance=3     page=0  chnl=0 \r
+char id=203   x=222     y=19     width=11     height=19     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
+char id=202   x=233     y=19     width=11     height=19     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
+char id=201   x=244     y=19     width=11     height=19     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
+char id=200   x=0     y=38     width=11     height=19     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
+char id=199   x=11     y=38     width=12     height=19     xoffset=1     yoffset=0    xadvance=11     page=0  chnl=0 \r
+char id=198   x=23     y=38     width=16     height=19     xoffset=-1     yoffset=0    xadvance=15     page=0  chnl=0 \r
+char id=197   x=39     y=38     width=11     height=19     xoffset=-1     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=196   x=50     y=38     width=11     height=19     xoffset=-1     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=195   x=61     y=38     width=11     height=19     xoffset=-1     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=194   x=72     y=38     width=11     height=19     xoffset=-1     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=193   x=83     y=38     width=11     height=19     xoffset=-1     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=192   x=94     y=38     width=11     height=19     xoffset=-1     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=191   x=105     y=38     width=10     height=19     xoffset=1     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=190   x=115     y=38     width=14     height=19     xoffset=0     yoffset=0    xadvance=13     page=0  chnl=0 \r
+char id=189   x=129     y=38     width=14     height=19     xoffset=1     yoffset=0    xadvance=13     page=0  chnl=0 \r
+char id=188   x=143     y=38     width=14     height=19     xoffset=1     yoffset=0    xadvance=13     page=0  chnl=0 \r
+char id=187   x=157     y=38     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=186   x=166     y=38     width=6     height=19     xoffset=0     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=185   x=172     y=38     width=6     height=19     xoffset=1     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=184   x=178     y=38     width=6     height=19     xoffset=1     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=183   x=184     y=38     width=6     height=19     xoffset=2     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=182   x=190     y=38     width=9     height=19     xoffset=0     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=181   x=199     y=38     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=180   x=208     y=38     width=6     height=19     xoffset=2     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=179   x=214     y=38     width=6     height=19     xoffset=0     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=178   x=220     y=38     width=6     height=19     xoffset=0     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=177   x=226     y=38     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=176   x=235     y=38     width=7     height=19     xoffset=1     yoffset=0    xadvance=6     page=0  chnl=0 \r
+char id=175   x=242     y=38     width=9     height=19     xoffset=0     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=174   x=0     y=57     width=12     height=19     xoffset=0     yoffset=0    xadvance=11     page=0  chnl=0 \r
+char id=172   x=12     y=57     width=10     height=19     xoffset=1     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=171   x=22     y=57     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=170   x=31     y=57     width=6     height=19     xoffset=0     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=169   x=37     y=57     width=12     height=19     xoffset=0     yoffset=0    xadvance=11     page=0  chnl=0 \r
+char id=168   x=49     y=57     width=6     height=19     xoffset=1     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=167   x=55     y=57     width=9     height=19     xoffset=0     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=166   x=64     y=57     width=4     height=19     xoffset=1     yoffset=0    xadvance=3     page=0  chnl=0 \r
+char id=165   x=68     y=57     width=9     height=19     xoffset=0     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=164   x=77     y=57     width=9     height=19     xoffset=0     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=163   x=86     y=57     width=9     height=19     xoffset=0     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=162   x=95     y=57     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=161   x=104     y=57     width=6     height=19     xoffset=2     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=127   x=110     y=57     width=12     height=19     xoffset=1     yoffset=0    xadvance=11     page=0  chnl=0 \r
+char id=42   x=122     y=57     width=7     height=19     xoffset=0     yoffset=0    xadvance=6     page=0  chnl=0 \r
+char id=126   x=129     y=57     width=10     height=19     xoffset=0     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=38   x=139     y=57     width=11     height=19     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
+char id=95   x=150     y=57     width=9     height=19     xoffset=0     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=35   x=159     y=57     width=9     height=19     xoffset=0     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=61   x=168     y=57     width=10     height=19     xoffset=1     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=43   x=178     y=57     width=10     height=19     xoffset=1     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=37   x=188     y=57     width=14     height=19     xoffset=1     yoffset=0    xadvance=13     page=0  chnl=0 \r
+char id=45   x=202     y=57     width=6     height=19     xoffset=0     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=36   x=208     y=57     width=9     height=19     xoffset=0     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=94   x=217     y=57     width=7     height=19     xoffset=0     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=92   x=224     y=57     width=5     height=19     xoffset=0     yoffset=0    xadvance=4     page=0  chnl=0 \r
+char id=64   x=229     y=57     width=16     height=19     xoffset=0     yoffset=0    xadvance=15     page=0  chnl=0 \r
+char id=47   x=245     y=57     width=5     height=19     xoffset=0     yoffset=0    xadvance=4     page=0  chnl=0 \r
+char id=124   x=250     y=57     width=4     height=19     xoffset=1     yoffset=0    xadvance=3     page=0  chnl=0 \r
+char id=62   x=0     y=76     width=10     height=19     xoffset=1     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=60   x=10     y=76     width=10     height=19     xoffset=1     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=125   x=20     y=76     width=6     height=19     xoffset=0     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=123   x=26     y=76     width=6     height=19     xoffset=0     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=93   x=32     y=76     width=5     height=19     xoffset=0     yoffset=0    xadvance=4     page=0  chnl=0 \r
+char id=91   x=37     y=76     width=5     height=19     xoffset=1     yoffset=0    xadvance=4     page=0  chnl=0 \r
+char id=41   x=42     y=76     width=6     height=19     xoffset=1     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=40   x=48     y=76     width=6     height=19     xoffset=1     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=58   x=54     y=76     width=5     height=19     xoffset=1     yoffset=0    xadvance=4     page=0  chnl=0 \r
+char id=59   x=59     y=76     width=5     height=19     xoffset=1     yoffset=0    xadvance=4     page=0  chnl=0 \r
+char id=44   x=64     y=76     width=5     height=19     xoffset=2     yoffset=0    xadvance=4     page=0  chnl=0 \r
+char id=46   x=69     y=76     width=5     height=19     xoffset=2     yoffset=0    xadvance=4     page=0  chnl=0 \r
+char id=39   x=74     y=76     width=4     height=19     xoffset=1     yoffset=0    xadvance=3     page=0  chnl=0 \r
+char id=63   x=78     y=76     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=96   x=87     y=76     width=6     height=19     xoffset=1     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=33   x=93     y=76     width=6     height=19     xoffset=2     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=34   x=99     y=76     width=6     height=19     xoffset=1     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=48   x=105     y=76     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=57   x=114     y=76     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=56   x=123     y=76     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=55   x=132     y=76     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=54   x=141     y=76     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=53   x=150     y=76     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=52   x=159     y=76     width=9     height=19     xoffset=0     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=51   x=168     y=76     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=50   x=177     y=76     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=49   x=186     y=76     width=9     height=19     xoffset=2     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=122   x=195     y=76     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=121   x=204     y=76     width=8     height=19     xoffset=-1     yoffset=0    xadvance=7     page=0  chnl=0 \r
+char id=120   x=212     y=76     width=8     height=19     xoffset=0     yoffset=0    xadvance=7     page=0  chnl=0 \r
+char id=119   x=220     y=76     width=12     height=19     xoffset=0     yoffset=0    xadvance=11     page=0  chnl=0 \r
+char id=118   x=232     y=76     width=8     height=19     xoffset=-1     yoffset=0    xadvance=7     page=0  chnl=0 \r
+char id=117   x=240     y=76     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=116   x=249     y=76     width=5     height=19     xoffset=0     yoffset=0    xadvance=4     page=0  chnl=0 \r
+char id=115   x=0     y=95     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=114   x=9     y=95     width=6     height=19     xoffset=1     yoffset=0    xadvance=5     page=0  chnl=0 \r
+char id=113   x=15     y=95     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=112   x=24     y=95     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=111   x=33     y=95     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=110   x=42     y=95     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=109   x=51     y=95     width=14     height=19     xoffset=1     yoffset=0    xadvance=13     page=0  chnl=0 \r
+char id=108   x=65     y=95     width=4     height=19     xoffset=1     yoffset=0    xadvance=3     page=0  chnl=0 \r
+char id=107   x=69     y=95     width=8     height=19     xoffset=1     yoffset=0    xadvance=7     page=0  chnl=0 \r
+char id=106   x=77     y=95     width=4     height=19     xoffset=-1     yoffset=0    xadvance=3     page=0  chnl=0 \r
+char id=105   x=81     y=95     width=4     height=19     xoffset=1     yoffset=0    xadvance=3     page=0  chnl=0 \r
+char id=104   x=85     y=95     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=103   x=94     y=95     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=102   x=103     y=95     width=5     height=19     xoffset=0     yoffset=0    xadvance=4     page=0  chnl=0 \r
+char id=101   x=108     y=95     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=100   x=117     y=95     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=99   x=126     y=95     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=98   x=135     y=95     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=97   x=144     y=95     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=90   x=153     y=95     width=9     height=19     xoffset=0     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=89   x=162     y=95     width=10     height=19     xoffset=0     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=88   x=172     y=95     width=10     height=19     xoffset=0     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=87   x=182     y=95     width=16     height=19     xoffset=0     yoffset=0    xadvance=15     page=0  chnl=0 \r
+char id=86   x=198     y=95     width=10     height=19     xoffset=-1     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=85   x=208     y=95     width=11     height=19     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
+char id=84   x=219     y=95     width=10     height=19     xoffset=0     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=83   x=229     y=95     width=11     height=19     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
+char id=82   x=240     y=95     width=12     height=19     xoffset=1     yoffset=0    xadvance=11     page=0  chnl=0 \r
+char id=81   x=0     y=114     width=13     height=19     xoffset=1     yoffset=0    xadvance=12     page=0  chnl=0 \r
+char id=80   x=13     y=114     width=11     height=19     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
+char id=79   x=24     y=114     width=13     height=19     xoffset=1     yoffset=0    xadvance=12     page=0  chnl=0 \r
+char id=78   x=37     y=114     width=11     height=19     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
+char id=77   x=48     y=114     width=12     height=19     xoffset=1     yoffset=0    xadvance=11     page=0  chnl=0 \r
+char id=76   x=60     y=114     width=9     height=19     xoffset=1     yoffset=0    xadvance=8     page=0  chnl=0 \r
+char id=75   x=69     y=114     width=11     height=19     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
+char id=74   x=80     y=114     width=8     height=19     xoffset=0     yoffset=0    xadvance=7     page=0  chnl=0 \r
+char id=73   x=88     y=114     width=4     height=19     xoffset=1     yoffset=0    xadvance=3     page=0  chnl=0 \r
+char id=72   x=92     y=114     width=11     height=19     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
+char id=71   x=103     y=114     width=12     height=19     xoffset=1     yoffset=0    xadvance=11     page=0  chnl=0 \r
+char id=70   x=115     y=114     width=10     height=19     xoffset=1     yoffset=0    xadvance=9     page=0  chnl=0 \r
+char id=69   x=125     y=114     width=11     height=19     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
+char id=68   x=136     y=114     width=12     height=19     xoffset=1     yoffset=0    xadvance=11     page=0  chnl=0 \r
+char id=67   x=148     y=114     width=12     height=19     xoffset=1     yoffset=0    xadvance=11     page=0  chnl=0 \r
+char id=66   x=160     y=114     width=11     height=19     xoffset=1     yoffset=0    xadvance=10     page=0  chnl=0 \r
+char id=65   x=171     y=114     width=11     height=19     xoffset=-1     yoffset=0    xadvance=9     page=0  chnl=0 \r
 kernings count=374\r
 kerning first=49  second=49  amount=-1\r
 kerning first=121  second=44  amount=-1\r
 kerning first=121  second=46  amount=-1\r
+kerning first=119  second=44  amount=-1\r
+kerning first=119  second=46  amount=-1\r
+kerning first=118  second=44  amount=-1\r
+kerning first=118  second=46  amount=-1\r
+kerning first=114  second=44  amount=-1\r
+kerning first=114  second=46  amount=-1\r
 kerning first=89  second=44  amount=-2\r
 kerning first=89  second=45  amount=-1\r
 kerning first=89  second=46  amount=-2\r
@@ -257,9 +263,3 @@ kerning first=65  second=84  amount=-1
 kerning first=65  second=86  amount=-1\r
 kerning first=65  second=87  amount=-1\r
 kerning first=65  second=89  amount=-1\r
-kerning first=119  second=44  amount=-1\r
-kerning first=119  second=46  amount=-1\r
-kerning first=118  second=44  amount=-1\r
-kerning first=118  second=46  amount=-1\r
-kerning first=114  second=44  amount=-1\r
-kerning first=114  second=46  amount=-1\r
index 7193344..5c4c033 100644 (file)
Binary files a/gdx/src/com/badlogic/gdx/utils/arial-15.png and b/gdx/src/com/badlogic/gdx/utils/arial-15.png differ
diff --git a/tests/gdx-tests/src/com/badlogic/gdx/tests/FilesTest.java b/tests/gdx-tests/src/com/badlogic/gdx/tests/FilesTest.java
new file mode 100644 (file)
index 0000000..5f152f2
--- /dev/null
@@ -0,0 +1,103 @@
+package com.badlogic.gdx.tests;\r
+\r
+import java.io.BufferedReader;\r
+import java.io.BufferedWriter;\r
+import java.io.File;\r
+import java.io.IOException;\r
+import java.io.InputStream;\r
+import java.io.InputStreamReader;\r
+import java.io.OutputStreamWriter;\r
+\r
+import com.badlogic.gdx.Files.FileType;\r
+import com.badlogic.gdx.Gdx;\r
+import com.badlogic.gdx.graphics.BitmapFont;\r
+import com.badlogic.gdx.graphics.Color;\r
+import com.badlogic.gdx.graphics.GL10;\r
+import com.badlogic.gdx.graphics.SpriteBatch;\r
+import com.badlogic.gdx.tests.utils.GdxTest;\r
+import com.badlogic.gdx.utils.GdxRuntimeException;\r
+\r
+public class FilesTest extends GdxTest {\r
+       String message = "";\r
+       boolean success;\r
+       BitmapFont font;\r
+       SpriteBatch batch;\r
+       \r
+       @Override\r
+       public void create() {\r
+               font = new BitmapFont();\r
+               batch = new SpriteBatch();\r
+               \r
+               if(Gdx.files.isExternalStorageAvailable()) {\r
+                       message += "external storage available\n";\r
+                       message += "external storage path: " + Gdx.files.getExternalStoragePath() + "\n";\r
+                       \r
+                       try {\r
+                               InputStream in = Gdx.files.readFile( "data/cube.obj", FileType.Internal);\r
+                               try { in.close(); } catch (IOException e) {     }\r
+                               message += "open internal success\n";\r
+                       } catch(Throwable e) {\r
+                               message += "Couldn't open internal data/cube.obj\n" + e.getMessage() + "\n";\r
+                       }\r
+                       \r
+                       BufferedWriter out = null;\r
+                       try {                           \r
+                               out = new BufferedWriter(new OutputStreamWriter(Gdx.files.writeFile("test.txt", FileType.External)));\r
+                               out.write("test");              \r
+                               message += "write external success\n";\r
+                       } catch(GdxRuntimeException ex) {\r
+                               message +="Couldn't open externalstorage/test.txt\n";\r
+                       } catch (IOException e) {\r
+                               message +="Couldn't write externalstorage/test.txt\n";\r
+                       } finally {\r
+                               if(out != null) {\r
+                                       try { out.close(); } catch (IOException e) {    }\r
+                               }\r
+                       }\r
+                       \r
+                       try {\r
+                               InputStream in = Gdx.files.readFile( "test.txt", FileType.External);\r
+                               try { in.close(); } catch (IOException e) {     }\r
+                               message +="Open external success\n";\r
+                       } catch(Throwable e) {\r
+                               message += "Couldn't open internal externalstorage/test.txt\n" + e.getMessage() + "\n";\r
+                       }\r
+                       \r
+                       BufferedReader in = null;                       \r
+                       try {                           \r
+                               in = new BufferedReader(new InputStreamReader(Gdx.files.readFile("test.txt", FileType.External)));\r
+                               if(!in.readLine().equals("test"))\r
+                                       message += "Read result wrong\n";\r
+                               else\r
+                                       message +="Read external success\n";\r
+                       } catch(GdxRuntimeException ex) {\r
+                               message +="Couldn't open externalstorage/test.txt\n";\r
+                       } catch (IOException e) {\r
+                               message +="Couldn't read externalstorage/test.txt\n";\r
+                       } finally {\r
+                               if(out != null) {\r
+                                       try { out.close(); } catch (IOException e) {    }\r
+                               }\r
+                       }\r
+                       \r
+                       if(!new File(Gdx.files.getExternalStoragePath() + "test.txt").delete())\r
+                               message += "couldn't delete externalstorage/test.txt";\r
+               } else {\r
+                       message += "External storage not available";\r
+               }\r
+       }\r
+       \r
+       @Override\r
+       public void render() {\r
+               Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
+               batch.begin();\r
+               font.drawMultiLineText(batch, message, 20, Gdx.graphics.getHeight() - 20, Color.WHITE );\r
+               batch.end();\r
+       }\r
+       \r
+       @Override\r
+       public boolean needsGL20() {\r
+               return false;\r
+       }\r
+\r
+}\r
index 8182733..77871a3 100644 (file)
@@ -10,6 +10,7 @@ import com.badlogic.gdx.tests.BitmapFontFlipTest;
 import com.badlogic.gdx.tests.BitmapFontTest;\r
 import com.badlogic.gdx.tests.Box2DTest;\r
 import com.badlogic.gdx.tests.Box2DTestCollection;\r
+import com.badlogic.gdx.tests.FilesTest;\r
 import com.badlogic.gdx.tests.FillrateTest;\r
 import com.badlogic.gdx.tests.FloatTest;\r
 import com.badlogic.gdx.tests.FrameBufferTest;\r
@@ -67,6 +68,7 @@ public class GdxTests
                BitmapFontTest.class,\r
                Box2DTest.class,\r
                Box2DTestCollection.class,\r
+               FilesTest.class,\r
                FillrateTest.class,\r
                FloatTest.class,\r
                FrameBufferTest.class,\r