code: public void setFont(Font font) {
          this.font = font;
          this.fontName = font.getFontName();
          this.fontSize = font.getSize();
      }
docs: <p>Sets the font to use to render the human-readable text. This is an alternative to setting the
  {@link #setFontName(String) font name} and {@link #setFontSize(int) font size} separately. May
  allow some applications to avoid the use of {@link GraphicsEnvironment#registerFont(Font)}
  when using the {@link Java2DRenderer}.
  
  <p>Do not use this method in combination with {@link #setFontName(String)} or {@link #setFontSize(int)}.
  
  @param font the font to use to render the human-readable text