Re: [REGRESSION] PangoWeight is not binded with Gtk3



On 9 February 2014 20:56, Torsten Schoenfeld <kaffeetisch gmx de> wrote:
PangoWeight is not binded with Gtk3.

I don't think that's correct.  Things like
Pango::FontDescription::get_weight should work as expected.  The problem
in your case is that the Gtk3::TextTag property "weight" is actually
specified to be an integer, not a Pango::Weight.  That's why you have to
use Gtk2::Pango->PANGO_WEIGHT_BOLD instead of plain "bold" in the Gtk2
program.  I don't see a generic way to solve this problem in
Glib::Object::Introspection, so maybe we should bring back the weight
constants.  Patches welcome.

note that py-gobject seems to bind them w/o any special code.
(probably _install_enums() in pygtkcompat.py)

See also:
$ perl -e 'use Gtk3 "-init"; warn Pango::parse_weight("bold", 0)'; echo $?
**
ERROR:gperl-i11n-invoke-c.c:590:_allocate_out_mem: code should not be reached
134

That does look like a bug; I'll have to investigate.


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