Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Edit:</strong> As the method <code>override_font</code> is deprecated you should use CSS as is described at this page - <a href="https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-override-font" rel="nofollow">https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-override-font</a></p> <p>The rest of the answer stays for history purposes.</p> <p>I have no idea why that wouldn't work.</p> <p>Here's a method to do it.</p> <pre><code>def set_global_styles(self, editor_widget): pango_context = editor_widget.create_pango_context() font_description = pango_context.get_font_description() increase = 14 #pt 14 font_size = 1024*increase font_description.set_size(font_size) editor_widget.override_font(font_description) </code></pre> <p>So far the easiest way I found to do it. Late answer, but better late than never.</p> <p>Just in case some resources for Pango and using the above code. I'm not sure if all the documentation for Pango applies to gtk3, but it worked for me.</p> <p><a href="http://www.pygtk.org/docs/pygtk/class-pangocontext.html#method-pangocontext--set-font-description" rel="nofollow">Pango context set font description</a></p> <p><a href="http://www.pygtk.org/docs/pygtk/class-pangofontdescription.html#method-pangofontdescription--set-size" rel="nofollow">Pango font description</a></p> <p><a href="http://developer.gnome.org/pango/stable/pango-Fonts.html#pango-font-description-new" rel="nofollow">Pango fonts in gtk</a></p> <p><a href="http://developer.gnome.org/pango/stable/pango-Layout-Objects.html#pango-layout-new" rel="nofollow">Pango layout</a></p> <p><a href="http://developer.gnome.org/gtk3/3.2/GtkWidget.html#gtk-widget-override-font" rel="nofollow">GtkWidget inherited by text editors</a> among other objects.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload