Alternate font


  I am a newbie so forgive if this is stupid.  We are using gtk-perl as opposed to gtk2-perl

 because we are stuck with version 1.2  of gtk.


  Here is what I tried.


1.       I brought up a FontSelectionDialog and browsed through that to get the desired alternate font.

2.       In the Font Information tab, I got the name of the font using the ‘Actual Font Name’ field.

3.       I put that into a perl variable called $Font_Name.

4.       Now I wanted to create an entire hierarchy of widgets that have this font so based on the

Archives, I did the following :


a.       my $style = Gtk::Widget->get_default_style();

b.       my $new_style = $style->copy();

c.       $new_style->font( Gtk::Gdk::Font->load( $Font_Name ) );

d.       Gtk::Widget->push_style( $new_style );

5.       Then I created my hierarchy of widgets starting with a Window.


  This has no effect.  Can someone tell me what I am doing wrong?


Sandra Carney

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]