public static String[] wrap(String raw, Font f, int width) {
		String[] words = raw.split(" ");
		ArrayList<String> lines = new ArrayList<>();
		int wordIndex = 0;
		String line = "";
		TrueTypeFont ttf = FontAssistant.getFont(f);
		
		while (wordIndex < words.length) {
			if (ttf.getWidth(line + " " + words[wordIndex]) <= width) {
				line += " " + words[wordIndex];
				wordIndex++;
			} else {
				
				lines.add(line);
				line = "";
			}
		}
		lines.add(line);
		
		ArrayList<String> realLines = new ArrayList<>();
		for (String s : lines) {
			String[] nls = s.split("\n");
			for (String nl : nls)
				realLines.add(nl);
		}
		
		return realLines.toArray(new String[] {});
	}