double width = bounds.getWidth() ;
double width = bounds.getWidth() + (text.length() * this.characterSpacing);
	public BufferedImage createImage() {		final boolean aa = this.optionAntiAliasing.isSelected();		if (this.externalImage != null) {			return this.externalImage;		}		String text = this.characterMap.getText();		if (text.length() == 0) {			return null;		}		// use dummy buffer for get a render context:		BufferedImage image = new BufferedImage(1,1,BufferedImage.TYPE_4BYTE_ABGR);		Graphics2D g = image.createGraphics();		if (aa) {			g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);		}else {			g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_OFF);		}		FontRenderContext fc = g.getFontRenderContext();		Rectangle2D bounds = this.derivedFont.getStringBounds(text,fc);		double height = bounds.getHeight();		double width = bounds.getWidth() /*+ (text.length() * this.characterSpacing)*/;		image = new BufferedImage( (int) width, (int) height, BufferedImage.TYPE_4BYTE_ABGR);		g = image.createGraphics();		Color transparent = new Color( 1, 1, 1, 0 );		g.setBackground( transparent );		g.clearRect(0, 0, (int) width, (int) height );		if (aa) {			g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);		}else {			g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_OFF);		}		g.setFont( this.derivedFont );		g.setColor( this.currentColor );		char[] characters = text.toCharArray();		int y = (int)-bounds.getY();		int x = 0;		for (int i = 0; i < characters.length; i++) {			g.drawChars(characters, i, 1, x, y );			bounds = this.derivedFont.getStringBounds(characters, i, i+1, fc);			x += (int) bounds.getWidth() + this.characterSpacing;		}		//g.drawString(text,0,(int)-bounds.getY());		return image;	}