I am simply trying to make the text bold in a GtkLabel
. All I can find are examples for Python and C#. Here is how I currently set up GtkLabel
s, but I don't know how to make them render the text in bold.
GtkWidget* label = gtk_label_new("Text I want to be bold");
A simple way is to call gtk_label_set_markup(), which accepts a string of Pango markup:
GtkWidget *label = gtk_label_new(NULL);
gtk_label_set_markup(GTK_LABEL(label), "<b>Text to be bold</b>");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With