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