Change font programmatically for GTK3 TextView (quickly-widgets TextEditor)

Posted by monotasker on Ask Ubuntu See other posts from Ask Ubuntu or by monotasker
Published on 2012-08-29T15:32:23Z Indexed on 2012/08/29 15:49 UTC
Read the original article Hit count: 319

In an app using PyGI and GTK3, I'm trying to let the user set the font family and size in a TextView through my app's settings dialog. In PyGI the TextView object has "set" methods for several properties, but not for font properties. I can set the font family via CSS using a CSS style provider. But I can't change that CSS dynamically to respect the font selected by a user. So how can I do this? (Note that the widget in question is actually the TextEditor from the quickly-widgets package and I'm using Quickly to build the app.)

Thanks,

Ian

© Ask Ubuntu or respective owner

Related posts about application-development

Related posts about quickly