use Button::Factory; my $on=Button::Factory->new ( font=>'-*-Arial-b-15-*-*'... # i'm not X font spec guru effects=>&bevel, background=>rgb(255,0,0), # red foreground=>rgb(255,255,0), # yellow ); my $off=Button::Factory->new ( font=>'-*-Arial-b-15-*-*'... # i'm not X font spec guru effects=>&none, background=>rgb(255,0,0), # red foreground=>rgb(80,80,0), # yellow ); foreach $word (qw(Up Down Left Right Foo)) { $on->make($word)->toGif("images/$word-on.gif"); $off->make($word)->toGif("images/$word-off.gif"); } Parameters to Button::Factor->new : font : fontspec to be used for the font. ** IMPORTANT ** freetype or some other anti-aliased font library needs to be used background : background colour (ie flood fill the image before effects) foreground : colour of the text width : width of button in pixels (undef means autosized to text's bounding box) height : height of button in pixels (undef means autosized to text's bounding box) effects : code ref that is called on the button before (or after?) the text is put on it. Predefined effects : windows_bevel => M$-windoze-like bevel mac_os_bevel => Mac OS-like bevel motif_bevel => X-windows-like bevel none => don't do nothing hightlight => one pixel line around the button in foreground colour