From 0d8b0c156aa9270c6a678a7d645dbb9c81269aef Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 2 Dec 2002 09:09:03 +0000 Subject: gtkfontinfo() is bugged since it uses a C macro which is (oh surprise) not in binary library .... : $fontinfo{$_} = Gtk2::Pango->PANGO_PIXELS($metrics->$func); --- perl-install/ugtk2.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index a3168db53..8db733c62 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -519,6 +519,11 @@ sub gtktext_insert { $textview; } +sub PANGO_PIXELS { + my ($d) = @_; + ($d + (0 <= $d ? 1024 : -1024) /2) / 1024; +} + # extracts interesting font metrics for a given widget sub gtkfontinfo { my ($widget) = @_; @@ -529,7 +534,8 @@ sub gtkfontinfo { foreach (qw(ascent descent approximate_char_width approximate_digit_width)) { no strict; my $func = "get_$_"; - $fontinfo{$_} = Gtk2::Pango->PANGO_PIXELS($metrics->$func); + print "TOTO: ", $metrics->$func, "\n";; + $fontinfo{$_} = PANGO_PIXELS($metrics->$func); } $metrics->unref; %fontinfo; -- cgit v1.2.1