Class: Gosu::FontsManager
- Inherits:
-
Object
- Object
- Gosu::FontsManager
- Defined in:
- lib/gosu_android/graphics/font.rb
Instance Method Summary collapse
- #getSymbol(symbol) ⇒ Object
-
#initialize(window) ⇒ FontsManager
constructor
A new instance of FontsManager.
Constructor Details
#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 |
Instance Method Details
#getSymbol(symbol) ⇒ Object
22 23 24 |
# File 'lib/gosu_android/graphics/font.rb', line 22 def getSymbol(symbol) @font_symbols[symbol] end |