Method: String#font

Defined in:
lib/term/font.rb

#font(name) ⇒ String

Note:

using ‘artii` gem. typing `artii -l` to see all fonts.

set the font.

Examples:

puts "term".font('big')

Parameters:

  • name (String)

    the font name

Returns:

  • (String)

    string with the font style.



19
20
21
22
# File 'lib/term/font.rb', line 19

def font(name)
  font_builder = self.class.fonts[name.to_s] ||= Artii::Base.new(font: name)
  font_builder.output self
end