/* * nonfunctional dpi fixer. * * gcc -Wall -o fixdpi `pkg-config --libs --cflags gtk+-3.0` fixdpi.c */ #include #include int main (int argc, char *argv[]) { GtkSettings *settings; gint dpi; gtk_init (&argc, &argv); settings = gtk_settings_get_default (); g_object_get (settings, "gtk-xft-dpi", &dpi, NULL); g_printerr ("gtk-xft-dpi: %d\n", dpi); if (argc > 1) { dpi = atoi (argv[1]) * 1024; g_printerr ("new gtk-xft-dpi: %d\n", dpi); g_object_set (settings, "gtk-xft-dpi", dpi, NULL); /* maybe this is needed for the setting to propagate back? */ gtk_main (); } return 0; }