On Fri, 2016-07-22 at 13:26 +0200, Stefan Salewski wrote:
> My font setting code in
> 
> https://github.com/ngtk3/NEd
> 
> is based on
> 
> https://developer.gnome.org/gtk3/stable/ch01s04.html#id-1.2.3.12.5
> 

Maybe not everybody is familiar with the GTK 3.20 application10
example, so I should mention that this code is used there:

  tag = gtk_text_buffer_create_tag (buffer, NULL, NULL);
  g_settings_bind (priv->settings, "font",
                   tag, "font",
                   G_SETTINGS_BIND_DEFAULT);

  gtk_text_buffer_get_start_iter (buffer, &start_iter);
  gtk_text_buffer_get_end_iter (buffer, &end_iter);
  gtk_text_buffer_apply_tag (buffer, tag, &start_iter, &end_iter);

So user can use the font chooser dialog, and font is applied to the
buffer automatically. Of course there may exist other ways to set font
for a buffer.
_______________________________________________
gnome-devtools mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gnome-devtools

Reply via email to