summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/ugtk2.pm8
1 files changed, 7 insertions, 1 deletions
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;