Method: Gosu::FontsManager#initialize

Defined in:
lib/gosu_android/graphics/font.rb

#initialize(window) ⇒ FontsManager

Returns a new instance of FontsManager.



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/gosu_android/graphics/font.rb', line 10

def initialize(window)
   file = Ruboto::R::drawable::character_atlas8
   font_vector = Gosu::Image::load_tiles(window, file, 13, 25, false)
   symbols = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-/*\'\"!?[]{}_.,:; "
   @font_symbols = {}
   i = 0
   symbols.each_char do |symbol|
     @font_symbols[symbol] = font_vector[i]
     i += 1
   end
end