2

My C program uses a custom CSS file to define its GTK style:

GFile* style = g_file_new_for_path("style.css");
gtk_css_provider_load_from_file(GTK_CSS_PROVIDER(provider), style, NULL);

In this file, no font-family declaration is made.

When I inspect my application on Linux using GTK_DEBUG=interactive, I find that the program's font is set to my system default, "Ubuntu":

enter image description here

My question is: how can I change this default behavior and use a custom font imported from a .ttf file in my entire application?

bluewhale
  • 167
  • 3
  • 13
  • [This question](https://stackoverflow.com/q/16598777/16775594) would be a duplicate, except for the fact that the answer's Python-specific. Just putting that out there, before anyone flags this as a duplicate. – Sylvester Kruin Feb 17 '22 at 22:09

0 Answers0