section id="FXFont" xreflabel="FXFont"
Práce s fonty.
#!/usr/bin/env ruby
# $Id: font1.rb,v 1.1 2005/10/04 08:52:07 radek Exp $
# $Source: /home/radek/cvs/ruby-book/example/gui/fxruby/font1.rb,v $
require "fox"
include Fox
class MyApp < FXApp
end
class MyWin < FXMainWindow
def initialize(app)
super(app, "Ahoj", nil, nil, DECOR_ALL, 0, 0, 188, 121)
FXLabel.new(self, "�������")
FXButton.new(self, "Konec", nil, app, FXApp::ID_QUIT)
end
def create
super
show(PLACEMENT_SCREEN)
end
end
if __FILE__ == $0
MyApp.new do |app|
app.normalFont = FXFont.new(app, "-*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso8859-2")
app.init(ARGV)
MyWin.new(app)
app.create
app.run
end
end
Výsledek poté vypadá takto

