public int getWidth(String str, double scale) {
		if (str == null)
			return 0;
		str = str.replaceAll("`", "");
		int width = -1;
		if (!str.contains("\r"))
			width = (int) (scale * str.length() * letterWidth);
		else {
			ArrayList<String> lines = new ArrayList<String>();
			String[] currentLines = str.split("\r");
			for (String l : currentLines)
				lines.add(l);
			for (String s : lines) {
				int i = (int) (scale * s.length() * letterWidth);
				if (i > width)
					width = i;
			}
		}
		return width;
	}