private static boolean processOneTokenForWrapToPixelWidth(String token, Font font, StringBuilder buffer, StringBuilder lineBuffer, int width, int[] lineWidth, boolean hasBeenWrapped) {
		int tokenWidth = getSimpleWidth(font, token);
		if (lineWidth[0] + tokenWidth <= width) {
			lineBuffer.append(token);
			lineWidth[0] += tokenWidth;
		} else if (lineWidth[0] == 0) {
			// Special-case a line that has not had anything put on it yet
			int count = token.length();
			lineBuffer.append(token.charAt(0));
			for (int i = 1; i < count; i++) {
				lineBuffer.append(token.charAt(i));
				if (getSimpleWidth(font, lineBuffer.toString()) > width) {
					lineBuffer.deleteCharAt(lineBuffer.length() - 1);
					buffer.append(lineBuffer);
					buffer.append(NEWLINE);
					hasBeenWrapped = true;
					lineBuffer.setLength(0);
					lineBuffer.append(token.charAt(i));
				}
			}
			lineWidth[0] = getSimpleWidth(font, lineBuffer.toString());
		} else {
			buffer.append(lineBuffer);
			buffer.append(NEWLINE);
			hasBeenWrapped = true;
			lineBuffer.setLength(0);
			lineWidth[0] = 0;
			if (!token.equals(SPACE)) {
				return processOneTokenForWrapToPixelWidth(token, font, buffer, lineBuffer, width, lineWidth, hasBeenWrapped);
			}
		}
		return hasBeenWrapped;
	}