@ -43,23 +43,22 @@ import java.io.BufferedReader;
import java.io.IOException ;
import java.io.IOException ;
import java.io.InputStream ;
import java.io.InputStream ;
import java.io.InputStreamReader ;
import java.io.InputStreamReader ;
import org.omg.PortableInterceptor.SYSTEM_EXCEPTION ;
public class BitmapFontLoader implements AssetLoader {
public class BitmapFontLoader implements AssetLoader {
private BitmapFont load ( AssetManager assetManager , String folder , InputStream in ) throws IOException {
private BitmapFont load ( AssetManager assetManager , String folder , InputStream in ) throws IOException {
MaterialDef spriteMat =
MaterialDef spriteMat =
( MaterialDef ) assetManager . loadAsset ( new AssetKey ( "Common/MatDefs/Misc/Unshaded.j3md" ) ) ;
( MaterialDef ) assetManager . loadAsset ( new AssetKey ( "Common/MatDefs/Misc/Unshaded.j3md" ) ) ;
BitmapCharacterSet charSet = new BitmapCharacterSet ( ) ;
BitmapCharacterSet charSet = new BitmapCharacterSet ( ) ;
Material [ ] matPages = null ;
Material [ ] matPages = null ;
BitmapFont font = new BitmapFont ( ) ;
BitmapFont font = new BitmapFont ( ) ;
BufferedReader reader = new BufferedReader ( new InputStreamReader ( in ) ) ;
BufferedReader reader = new BufferedReader ( new InputStreamReader ( in ) ) ;
String regex = "[\\s=]+" ;
String regex = "[\\s=]+" ;
font . setCharSet ( charSet ) ;
font . setCharSet ( charSet ) ;
while ( reader . ready ( ) ) {
String line ;
String line = reader . readLine ( ) ;
while ( ( line = reader . readLine ( ) ) ! = null ) {
String [ ] tokens = line . split ( regex ) ;
String [ ] tokens = line . split ( regex ) ;
if ( tokens [ 0 ] . equals ( "info" ) ) {
if ( tokens [ 0 ] . equals ( "info" ) ) {
// Get rendered size
// Get rendered size