in reply to Re: Tk::Canvas font problem
in thread Tk::Canvas font problem

Tried that but it remains the (standard) small font.

Replies are listed 'Best First'.
Re^3: Tk::Canvas font problem
by keszler (Priest) on Jun 27, 2004 at 15:09 UTC
    This little test prog gives the expected results (two fonts, three sizes) on the Win98 and Win2K boxes here:

    use strict; use warnings; use Tk; my $top = MainWindow->new(); my $canvas = $top->Canvas ()->pack; $canvas->createText(60, 60, -font => '-*-MS Sans Serif-Medium-R-Normal-*-*-240-*-*-*-*-*-*', -text => 'Hello world', ); $canvas->createText(60, 120, -font => '-*-MS Sans Serif-Medium-R-Normal-*-*-120-*-*-*-*-*-*', -text => 'Hello2 world2', ); $canvas->createText(60, 180, -font => '-*-Century-Medium-R-Normal-*-*-180-*-*-*-*-*-*', -text => 'Hello3 world3', ); Tk::MainLoop;