Method: Processing::GraphicsContext#textFont

Defined in:
lib/processing/graphics_context.rb

#textFont(font) ⇒ Font #textFont(name) ⇒ Font #textFont(font, size) ⇒ Font #textFont(name, size) ⇒ Font

Sets font.

Parameters:

  • font (Font) (defaults to: nil)

    font

  • name (String)

    font name

  • size (Numeric) (defaults to: nil)

    font size (max 256)

Returns:

  • (Font)

    current font



602
603
604
605
# File 'lib/processing/graphics_context.rb', line 602

def textFont(font = nil, size = nil)
  setFont__ font, size if font || size
  Font.new @painter__.font
end