protected void setFont ( Font newFont ) { if ( font == null || ! font . equals ( newFont ) ) { font = new Font ( newFont . getAttributes ( ) ) ; invalidateCache ( ) ; invalidateTextLayout ( ) ; } }
Sets the font .