Class: Dedalus::FontRepository

Inherits:
Object
  • Object
show all
Defined in:
lib/dedalus/font_repository.rb

Class Method Summary collapse

Class Method Details

.get_font(font_name = 'Helvetica', size: 20) ⇒ Object



3
4
5
6
7
8
# File 'lib/dedalus/font_repository.rb', line 3

def self.get_font(font_name='Helvetica',size: 20)
  @fonts ||= {}
  @fonts[font_name] ||= {}
  @fonts[font_name][size] ||= Gosu::Font.new(size, name: font_name)
  @fonts[font_name][size]
end