Here is my attempt:

void changefont ( GtkWidget * widget , PangoFontDescription * tofd )
   {
   PangoContext * context = gtk_widget_get_pango_context ( widget );
   PangoLayout * layout = pango_layout_new ( context );
   pango_layout_set_font_description ( layout, tofd );
   }

Then at start of textview:

   GtkWidget * e = gtk_text_view_new ( ) ;
   GtkTextBuffer * buf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (e));
   changefont ( e , fixedfontfd ) ; // fixed font previously defined in my code
   gtk_text_buffer_set_text (buf, inittext, -1);

The font does not change. Is the above wrong?
How to do this?

I have very little experience with GTK fonts. Help would be very much 
appreciated.




      New Email names for you! 
Get the Email name you've always wanted on the new @ymail and @rocketmail. 
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/
_______________________________________________
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to