Re: How to create attributes in Pango



Op 05/05/2017 om 05:32 PM schreef Slavomir Vlcek:
1.) Please could anyone tell me how to replace the c-based function
     "pango_attr_family_new()"? This is one of many functions
     that does not seem to have a python equivalent
     (according to http://lazka.github.io/pgi-docs/#Pango-1.0/mapping.html).

There is an open bug on this [1]. There is however a alternative (better?) way to style widgets in Gtk3, it is CSS. I recently modified a script to show how it is done, see [2]. If you are not styling widgets please elaborate what you are actually trying to do.
2.) By the way when I pass (unitialized) Pango.Attribute() instance
     to the insert() method, my script ends with SIGFAULT.

     attrs = Pango.AttrList()
     attr = Pango.Attribute()
     attrs.insert(attr)

     I guess that is not the correct behavior.

Have not used Pango but reading the bug [1] it may be related to it.

~infirit

[1] https://bugzilla.gnome.org/show_bug.cgi?id=646788
[2] https://gist.github.com/infirit/cf4f531e03136b641471b079b8370ead


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]