switch (getFont().getStyle()){ case Font.BOLD: elem.setAttribute( "font-weight", "bold"); break; case Font.ITALIC: elem.setAttribute( "font-style", "italic"); break; case (Font.BOLD+Font.ITALIC): elem.setAttribute( "font-style", "italic"); elem.setAttribute( "font-weight", "bold"); break; } String textDecorator = null; Map attributes = getFont().getAttributes(); if (attributes.get(TextAttribute.UNDERLINE) == TextAttribute.UNDERLINE_ON){ textDecorator = "underline"; } if (attributes.get(TextAttribute.STRIKETHROUGH) == TextAttribute.STRIKETHROUGH_ON){ if (textDecorator == null) textDecorator = "line-through"; else textDecorator += ",line-through"; } if (textDecorator != null) elem.setAttribute( "text-decoration", textDecorator);
	protected Element createText( String text )	{		Element elem = dom.createElement( "text" ); //$NON-NLS-1$		elem.appendChild( dom.createTextNode( text ) );		elem.setAttribute( "font-family", getFont().getFamily()); //$NON-NLS-1$		elem.setAttribute( "font-size", Integer.toString(getFont().getSize())); //$NON-NLS-1$		String style = getRenderingStyle(RenderingHints.KEY_TEXT_ANTIALIASING);		if ( color != null ){			String alpha = alphaToString( color );			if ( alpha != null )				style += "fill-opacity:" + alpha + ";"; //$NON-NLS-1$ //$NON-NLS-2$			style += "fill:" + serializeToString( color ) + ";"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$		}		elem.setAttribute("style", style);		if ( transforms.getType( ) != AffineTransform.TYPE_IDENTITY )		{			double[] matrix = new double[6];			transforms.getMatrix( matrix );			elem.setAttribute( "transform", "matrix(" + matrix[0] + "," + matrix[1] + "," + matrix[2] + "," + matrix[3] + "," + matrix[4] + "," + matrix[5] + ")" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$		}				return elem;	}