Hi Tadej, Thanks for your ultra-fast response. It almost came before I had written the question. Yes, indeed gtk_widget_modify_font did the trick! So simple, but I did not know about this call. Again many thanks. Ken ---- Hi. Have you tried to use gtk_widget_modify_font on your text view? I think this should do the trick. Tadej ----- 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. |