How to change the default font of a GtkTextView?

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

 



  One would think changing the default font of a newly-created GtkTextView
would be a piece of cake, but I simply can't find any way of doing that.
There doesn't seem to be any function which would do that directly in
either GtkTextView nor in any base classes.
  My best guess was this:

pango_font_description_set_family(textView->style->font_desc, "Courier");

  However, it doesn't seem to work. How should it be done?
  (Applying tags to the whole textbuffer is not a good solution because
they don't stay applied to the whole text when the text is edited from
the beginning or the end. Besides, it feels needless when there should
simply be a way of specifying a default font directly.)

  Btw, where do I get a list of font family names? I can't find that either
(that "Courier" was a pure guess!).

							- Warp

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux