private static int getCharWidth(Font font, char ch, TIntIntHashMap map) {
		int width = map.get(ch);
		if (width == 0) {
			width = Fonts.getFontMetrics(font).charWidth(ch);
			if (width == 0) {
				width = 1;
			}
			map.put(ch, width);
		}
		return width;
	}