Module: Shoes::Swt::Font

Defined in:
shoes-swt/lib/shoes/swt/font.rb

Class Method Summary collapse

Class Method Details

.add_font(path) ⇒ Object



7
8
9
10
11
# File 'shoes-swt/lib/shoes/swt/font.rb', line 7

def add_font(path)
  return unless File.exist?(path) && load_font(path)

  ::Shoes::Font.add_font_to_fonts(path)
end

.setup_fontsObject



13
14
15
16
17
18
19
20
# File 'shoes-swt/lib/shoes/swt/font.rb', line 13

def setup_fonts
  # If we've already loaded fonts previously, bail
  return if ::Shoes::FONTS.any?

  load_shoes_fonts
  load_system_fonts
  ::Shoes::FONTS.uniq!
end