question: protected void writeNonHTMLAttributes ( AttributeSet attr ) throws IOException { String style = "" ; String separator = "; " ; if ( inFontTag ( ) && fontAttributes . isEqual ( attr ) ) { return ; } boolean first = true ; Color color = ( Color ) attr . getAttribute ( StyleConstants . Foreground ) ; if ( color != null ) { style += "color: " + css . styleConstantsValueToCSSValue ( ( StyleConstants ) StyleConstants . Foreground , color ) ; first = false ; } Integer size = ( Integer ) attr . getAttribute ( StyleConstants . FontSize ) ; if ( size != null ) { if ( ! first ) { style += separator ; } style += "font-size: " + size . intValue ( ) + "pt" ; first = false ; } String family = ( String ) attr . getAttribute ( StyleConstants . FontFamily ) ; if ( family != null ) { if ( ! first ) { style += separator ; } style += "font-family: " + family ; first = false ; } if ( style . length ( ) > 0 ) { if ( fontMask != 0 ) { writeEndMask ( fontMask ) ; fontMask = 0 ; } startSpanTag ( style ) ; fontAttributes = attr ; } else if ( fontAttributes != null ) { writeEndMask ( fontMask ) ; fontMask = 0 ; endSpanTag ( ) ; } }
target:  Writes out the remaining character-level attributes (attributes other than bold, italic, and underline) in an HTML-compliant way.  Given that attributes such as font family and font size have no direct mapping to HTML tags, a &lt;span&gt; tag is generated and its style attribute is set to contain the list of remaining attributes just like inline styles.