Class: UI::Font

Inherits:
Object show all
Defined in:
flow/ui/font.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Object) initialize(obj, size, trait = nil)

Parameters:

  • name (String)
  • size (Fixnum)
  • trait (Symbol) (defaults to: nil)

    :normal, :bold, :italic, :bold_italic



# File 'flow/ui/font.rb', line 27

Instance Attribute Details

- (Object) proxy (readonly)

Returns the value of attribute proxy



25
26
27
# File 'flow/ui/font.rb', line 25

def proxy
  @proxy
end

Instance Method Details

- (Boolean) bold?

Returns wether the font is bold

Returns:

  • (Boolean)


40
41
42
# File 'flow/ui/font.rb', line 40

def bold?
  trait == :bold or trait == :bold_italic
end

- (Boolean) italic?

Returns wether the font is italic

Returns:

  • (Boolean)


34
35
36
# File 'flow/ui/font.rb', line 34

def italic?
  trait == :italic or trait == :bold_italic
end