Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I change the font of a GtkText widget?

font gtktext widget
0
10 Posted

How do I change the font of a GtkText widget?

0
10

There are a couple of ways of doing this. As GTK+ allows the appearance of applications to be changed at run time using resources you can use something like the following in the appropriate file: style “text” { font = “-adobe-helvetica-medium-r-normal–*-100-*-*-*-*-*-*” } Another way to do this is to load a font within your program, and then use this in the functions for adding text to the text widget.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123