public void write(File file) {
		try {
			BinBuffer binb = new BinBuffer();
			
			BinBuffer imageData = new BinBuffer();
			ImageOut.write(image,ImageOut.PNG,new BinBufferOutputStream(imageData));
			imageData.setPos(0);
			binb.writeUInt(imageData.getSize());
			binb.writeBinBuffer(imageData);
			
			binb.writeUInt(glyphs.length);
			for (int i = 0; i < glyphs.length; i++) {
				binb.writeInt((int)glyphs[i].getX());
				binb.writeInt((int)glyphs[i].getY());
				binb.writeInt((int)glyphs[i].getWidth());
				binb.writeInt((int)glyphs[i].getHeight());
				
				binb.writeInt((int)cropping[i].getX());
				binb.writeInt((int)cropping[i].getY());
				binb.writeInt((int)cropping[i].getWidth());
				binb.writeInt((int)cropping[i].getHeight());
				
				binb.writeJavaString(""+chars[i]);
			}
			
			binb.writeInt(spacingV);
			binb.writeFloat(spacingH);
			
			binb.writeUInt(kerning.length);
			for (int i = 0; i < kerning.length; i++) for (int j = 0; j < kerning[0].length; j++) binb.writeFloat(kerning[i][j]);
			
			binb.setPos(0);
			new BinFile(file).write(binb);
		} catch (Exception e) {App.getApp().handle(e);}
	}