Top Level Namespace
Defined Under Namespace
Modules: Rubeus Classes: FrameBringer
Instance Method Summary collapse
-
#find_font(otherwise, style, size, *families) ⇒ Object
Try to find preferred font family, use otherwise – err – otherwise.
Instance Method Details
#find_font(otherwise, style, size, *families) ⇒ Object
Try to find preferred font family, use otherwise – err – otherwise
21 22 23 24 25 |
# File 'bin/jirb_rubeus', line 21 def find_font(otherwise, style, size, *families) avail_families = java.awt.GraphicsEnvironment.local_graphics_environment.available_font_family_names fontname = families.find(proc {otherwise}) { |name| avail_families.include? name } Font.new(fontname, style, size) end |