Method: Symbol#uifont
- Defined in:
- lib/sugarcube-uikit/symbol.rb
#uifont(size = nil) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/sugarcube-uikit/symbol.rb', line 17 def uifont(size=nil) size ||= UIFont.systemFontSize # system fonts if Symbol.uifont.has_key? self font = SugarCube.look_in(self, Symbol.uifont) if size.is_a?(Symbol) size = size.uifontsize end if font.is_a?(Symbol) return UIFont.send(font, size) else return font.uifont(size) end else if size.is_a?(Symbol) size = size.uifontsize end return UIFont.systemFontOfSize(size) end end |