Class: Quartz::Font
- Inherits:
-
Object
- Object
- Quartz::Font
- Defined in:
- lib/rubyquartz/font.rb
Constant Summary collapse
- @@Families =
nil
Class Method Summary collapse
- .families ⇒ Object
-
.fonts_in_family(family) ⇒ Object
TODO: Is sorting really worth it?.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Font
constructor
A new instance of Font.
Constructor Details
#initialize(options = {}) ⇒ Font
Returns a new instance of Font.
42 43 44 45 46 |
# File 'lib/rubyquartz/font.rb', line 42 def initialize(={}) name = [:name] size = [:size] _initialize_with_name_and_size(name, size) end |
Class Method Details
.families ⇒ Object
30 31 32 33 34 35 |
# File 'lib/rubyquartz/font.rb', line 30 def self.families if @@Families.nil? @@Families = _families.sort end @@Families end |
.fonts_in_family(family) ⇒ Object
TODO: Is sorting really worth it?
38 39 40 |
# File 'lib/rubyquartz/font.rb', line 38 def self.fonts_in_family(family) _fonts_in_family(family).sort end |