label offsets characters


  I'm new to gtk-perl, and I'm trying to build an app to help
me learn japanese characters. It works fairly well, except that
all hiranaga characters seem to be offset towards the top,
and consequently, some characters appear "shaved" of a few
pixels on the top. The short script below demonstrates this.
It simply creates a window containing a label, displaying
a single hiragana character, the one for the 'zo' syllable.

At least on my machine, the tiny window displays the zo character,
but it clashes with the window title bar. However, on resizing
the window, the whole character appears. (attachment shows an
example before and after resizing.) By the way, I'm running
Ubuntu (6.06) with the "standard" gtk2-perl (version says

Any idea about why those characters are all offset in this way?



#! /usr/bin/perl -w
use strict;
use Gtk2 -init;
use Glib qw/TRUE FALSE/;

my $zo = '&#12382;';

my $label = Gtk2::Label->new( );
$label->set_markup( markup( $zo ) );

my $window = Gtk2::Window->new ('toplevel');
$window->signal_connect( delete_event => sub { Gtk2->main_quit; });



sub markup
  return( '<span font_desc="Bitstream Vera Serif 32">' . $_[0] .

Attachment: zo.png
Description: PNG image

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