// Path: src/main/java/engineTester/Settings.java
// public class Settings {
// 	// Game Settings
// 	public static int WINDOW_WIDTH = 800;
// 	public static int WINDOW_HEIGHT = 600;
// 
// 	public static int FPS_CAP = 30;
// 	public static boolean SHOW_FPS = true;
// 	public static int FPS_REFRESH_TIME = 1000;
// 
// 	public static int SHADOW_RENDER_DISTANCE = 100;
// 	public static int SHADOW_MAP_SIZE = 4096;
// 
// 	public static int MAX_LIGHTS = 4; // do not change
// 
// 	public static boolean FULL_SCREEN = false;
// 	public static boolean VSYNC = false;
// 
// 	public static boolean ENABLE_ANTIALIASING = true;
// 
// 	public static final String gameSettingPatch = FileManager.releasePath + "/config/settings.cfg";
// 
// 	public static void loadSettings() {
// 
// 		File f = new File(gameSettingPatch);
// 		if (f.exists()) {
// 			readFromSettingsFile();
// 		} else {
// 			writeToSettingsFile();
// 		}
// 	}
// 
// 	public static void readFromSettingsFile() {
// 		Properties properties = new Properties();
// 		InputStream input = null;
// 
// 		try {
// 			input = new FileInputStream(gameSettingPatch);
// 			properties.load(input);
// 
// 			WINDOW_WIDTH 			= Integer.parseInt(properties.getProperty("width"));
// 			WINDOW_HEIGHT 			= Integer.parseInt(properties.getProperty("height"));
// 			FPS_CAP 				= Integer.parseInt(properties.getProperty("fpsCap"));
// 			SHOW_FPS 				= Boolean.parseBoolean(properties.getProperty("showFPS"));
// 			FPS_REFRESH_TIME		= Integer.parseInt(properties.getProperty("fpsRefreshTime"));
// 			SHADOW_RENDER_DISTANCE 	= Integer.parseInt(properties.getProperty("shadowRenderDistance"));
// 			SHADOW_MAP_SIZE 		= Integer.parseInt(properties.getProperty("shadowMapSize"));
// 			FULL_SCREEN 			= Boolean.parseBoolean(properties.getProperty("fullScreen"));
// 			VSYNC 					= Boolean.parseBoolean(properties.getProperty("vsync"));
// 			ENABLE_ANTIALIASING 	= Boolean.parseBoolean(properties.getProperty("antialiasing"));
// 			input.close();
// 
// 		} catch (IOException ex) {
// 			ex.printStackTrace();
// 		}
// 	}
// 
// 	public static void writeToSettingsFile() {
// 		Properties properties = new Properties();
// 		OutputStream output = null;
// 
// 		try {
// 			new File(FileManager.releasePath + "/config/").mkdir();
// 			output = new FileOutputStream(gameSettingPatch);
// 			output.write(DisplayManager.WINDOWNAME.getBytes(Charset.forName("UTF-8")));
// 
// 			properties.setProperty("width", String.valueOf(WINDOW_WIDTH));
// 			properties.setProperty("height", String.valueOf(WINDOW_HEIGHT));
// 			properties.setProperty("fpsCap", String.valueOf(FPS_CAP));
// 			properties.setProperty("showFPS", String.valueOf(SHOW_FPS));
// 			properties.setProperty("fpsRefreshTime", String.valueOf(FPS_REFRESH_TIME));
// 			properties.setProperty("shadowRenderDistance", String.valueOf(SHADOW_RENDER_DISTANCE));
// 			properties.setProperty("shadowMapSize", String.valueOf(SHADOW_MAP_SIZE));
// 			properties.setProperty("fullScreen", String.valueOf(FULL_SCREEN));
// 			properties.setProperty("vsync", String.valueOf(VSYNC));
// 			properties.setProperty("antialiasing", String.valueOf(ENABLE_ANTIALIASING));
// 
// 			// root folder
// 			properties.store(output, "");
// 			output.close();
// 		} catch (IOException io) {
// 			io.printStackTrace();
// 		}
// 	}
// }


import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.lwjgl.opengl.Display;
import engineTester.Settings;
package fontMeshCreator;




/**
 * Provides functionality for getting the values from a font file.
 * 
 * @author Karl
 *
 */
public class MetaFile {

	private static final int PAD_TOP = 0;
	private static final int PAD_LEFT = 1;
	private static final int PAD_BOTTOM = 2;
	private static final int PAD_RIGHT = 3;

	private static final int DESIRED_PADDING = 3; // 3

	private static final String SPLITTER = " ";
	private static final String NUMBER_SEPARATOR = ",";

	private double aspectRatio;

	private double verticalPerPixelSize;
	private double horizontalPerPixelSize;
	private double spaceWidth;
	private int[] padding;
	private int paddingWidth;
	private int paddingHeight;

	private Map<Integer, Character> metaData = new HashMap<Integer, Character>();

	private BufferedReader reader;
	private Map<String, String> values = new HashMap<String, String>();

	/**
	 * Opens a font file in preparation for reading.
	 * 
	 * @param file
	 *            - the font file.
	 */
	protected MetaFile(File file) {
// Path: src/main/java/engineTester/Settings.java
// public class Settings {
// 	// Game Settings
// 	public static int WINDOW_WIDTH = 800;
// 	public static int WINDOW_HEIGHT = 600;
// 
// 	public static int FPS_CAP = 30;
// 	public static boolean SHOW_FPS = true;
// 	public static int FPS_REFRESH_TIME = 1000;
// 
// 	public static int SHADOW_RENDER_DISTANCE = 100;
// 	public static int SHADOW_MAP_SIZE = 4096;
// 
// 	public static int MAX_LIGHTS = 4; // do not change
// 
// 	public static boolean FULL_SCREEN = false;
// 	public static boolean VSYNC = false;
// 
// 	public static boolean ENABLE_ANTIALIASING = true;
// 
// 	public static final String gameSettingPatch = FileManager.releasePath + "/config/settings.cfg";
// 
// 	public static void loadSettings() {
// 
// 		File f = new File(gameSettingPatch);
// 		if (f.exists()) {
// 			readFromSettingsFile();
// 		} else {
// 			writeToSettingsFile();
// 		}
// 	}
// 
// 	public static void readFromSettingsFile() {
// 		Properties properties = new Properties();
// 		InputStream input = null;
// 
// 		try {
// 			input = new FileInputStream(gameSettingPatch);
// 			properties.load(input);
// 
// 			WINDOW_WIDTH 			= Integer.parseInt(properties.getProperty("width"));
// 			WINDOW_HEIGHT 			= Integer.parseInt(properties.getProperty("height"));
// 			FPS_CAP 				= Integer.parseInt(properties.getProperty("fpsCap"));
// 			SHOW_FPS 				= Boolean.parseBoolean(properties.getProperty("showFPS"));
// 			FPS_REFRESH_TIME		= Integer.parseInt(properties.getProperty("fpsRefreshTime"));
// 			SHADOW_RENDER_DISTANCE 	= Integer.parseInt(properties.getProperty("shadowRenderDistance"));
// 			SHADOW_MAP_SIZE 		= Integer.parseInt(properties.getProperty("shadowMapSize"));
// 			FULL_SCREEN 			= Boolean.parseBoolean(properties.getProperty("fullScreen"));
// 			VSYNC 					= Boolean.parseBoolean(properties.getProperty("vsync"));
// 			ENABLE_ANTIALIASING 	= Boolean.parseBoolean(properties.getProperty("antialiasing"));
// 			input.close();
// 
// 		} catch (IOException ex) {
// 			ex.printStackTrace();
// 		}
// 	}
// 
// 	public static void writeToSettingsFile() {
// 		Properties properties = new Properties();
// 		OutputStream output = null;
// 
// 		try {
// 			new File(FileManager.releasePath + "/config/").mkdir();
// 			output = new FileOutputStream(gameSettingPatch);
// 			output.write(DisplayManager.WINDOWNAME.getBytes(Charset.forName("UTF-8")));
// 
// 			properties.setProperty("width", String.valueOf(WINDOW_WIDTH));
// 			properties.setProperty("height", String.valueOf(WINDOW_HEIGHT));
// 			properties.setProperty("fpsCap", String.valueOf(FPS_CAP));
// 			properties.setProperty("showFPS", String.valueOf(SHOW_FPS));
// 			properties.setProperty("fpsRefreshTime", String.valueOf(FPS_REFRESH_TIME));
// 			properties.setProperty("shadowRenderDistance", String.valueOf(SHADOW_RENDER_DISTANCE));
// 			properties.setProperty("shadowMapSize", String.valueOf(SHADOW_MAP_SIZE));
// 			properties.setProperty("fullScreen", String.valueOf(FULL_SCREEN));
// 			properties.setProperty("vsync", String.valueOf(VSYNC));
// 			properties.setProperty("antialiasing", String.valueOf(ENABLE_ANTIALIASING));
// 
// 			// root folder
// 			properties.store(output, "");
// 			output.close();
// 		} catch (IOException io) {
// 			io.printStackTrace();
// 		}
// 	}
// }


// Path: src/main/java/fontMeshCreator/MetaFile.java
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.lwjgl.opengl.Display;
import engineTester.Settings;

package fontMeshCreator;




/**
 * Provides functionality for getting the values from a font file.
 * 
 * @author Karl
 *
 */
public class MetaFile {

	private static final int PAD_TOP = 0;
	private static final int PAD_LEFT = 1;
	private static final int PAD_BOTTOM = 2;
	private static final int PAD_RIGHT = 3;

	private static final int DESIRED_PADDING = 3; // 3

	private static final String SPLITTER = " ";
	private static final String NUMBER_SEPARATOR = ",";

	private double aspectRatio;

	private double verticalPerPixelSize;
	private double horizontalPerPixelSize;
	private double spaceWidth;
	private int[] padding;
	private int paddingWidth;
	private int paddingHeight;

	private Map<Integer, Character> metaData = new HashMap<Integer, Character>();

	private BufferedReader reader;
	private Map<String, String> values = new HashMap<String, String>();

	/**
	 * Opens a font file in preparation for reading.
	 * 
	 * @param file
	 *            - the font file.
	 */
	protected MetaFile(File file) {
		this.aspectRatio = (double) Settings.WINDOW_WIDTH / (double) Settings.WINDOW_HEIGHT;