String weight = (String)a.getAttribute(Style.FONT_WEIGHT);
String weight = (String)a.get(Style.FONT_WEIGHT);
    public static SFont getFont(AttributeSet a) {        boolean anyFontAttribute = false;	int size = getFontSize(a);        anyFontAttribute |= (size > 0);	/*	 * If the vertical alignment is set to either superscirpt or	 * subscript we reduce the font size by 2 points.	 */	String vAlign = (String)a.getAttribute(Style.VERTICAL_ALIGN);	if (vAlign != null) {	    if ((vAlign.indexOf("sup") >= 0) ||		(vAlign.indexOf("sub") >= 0)) {		size -= 2;	    }	}	String family = (String)a.getAttribute(Style.FONT_FAMILY);        anyFontAttribute |= (family != null);	int style = Font.PLAIN;	String weight = (String)a.getAttribute(Style.FONT_WEIGHT);	if (weight == null)	    ;	else if (weight.equals("bold")) {	    style |= Font.BOLD;	}	else if (weight.equals("normal"))	    ;	else {	    try {		int w = Integer.parseInt(weight);		if (w > 400)		    style |= Font.BOLD;	    } catch (NumberFormatException nfe) {}	}        anyFontAttribute |= (weight != null);	String styleValue = (String)a.getAttribute(Style.FONT_STYLE);	if ((styleValue != null) && (styleValue.indexOf(Style.ITALIC) >= 0))	    style |= Font.ITALIC;        anyFontAttribute |= (styleValue != null);	return anyFontAttribute ? new SFont(family, style, size) : null;    }