Plotinus has asked for the wisdom of the Perl Monks concerning the following question:

Hello, Am using ActivePerl 5.8, PAR 8.5 module on Windows XP Thanks to previous help I am now able to package my perl scripts as stand alone executables on Windows. However when I package up a Tk script (Tk is fully integrated into ActivePerl) and it runs perfectly on my machine. However on other machines the resultant gui has garbled labels (basically all squares). Now I may be a newbie at Perl\Tk but I am a very experienced Sys Admin (both in windows and unix - so no comments about "experienced windows admins please) so I recognise this as a font not recognised issue. I changed the code to include the following;

my $info_frm = $mw->Frame(-relief => 'groove', -borderwidth => 2, -label => "This application is to install Libs", -labelFont=> 'Arial') ->pack;
to try and embed the font but no luck. As you can see the font I used is Arial (i.e. it IS on all windows) so it should be recognised. Also all the PCs I have tested it on are also Windows XP.

Thanks for any thoughts or pointers - or even the answer;).

Plotinus

Replies are listed 'Best First'.
Re: Using pp with Tk garbles my lable fonts...
by zentara (Cardinal) on Dec 30, 2004 at 19:47 UTC
    Maybe try to create a font object like the following. The fontCreate is in "perldoc Tk::Font" ( I have found the 'bigfont' to work on linux and windows.)
    my $font = $mw->fontCreate('normal', -family => "helvetica", -size => 24, -weight => "bold"); my $bigfont = $mw->fontCreate('big', -family=>'courier', -weight=>'bold', -size=>int(-18*18/14)); my $info_frm = $mw->Frame( -relief => 'groove', -borderwidth => 2, -label => "This application is to install Libs", -labelFont=> 'bigfont') ->pack;

    I'm not really a human, but I play one on earth. flash japh
Re: Using pp with Tk garbles my lable fonts...
by Plotinus (Sexton) on Jan 05, 2005 at 16:00 UTC
    Dear monks,

    Finally found the answer to my own question. The fault is with pre-0.85 versions of PAR. If you are unable to get a later version of PAR then  use Encode::Unicode; should fix it. If you have Activestate Perl with the standard repositories then these are, apparently out of date. The following commands (at the command line) should help.

    ppm remove par
    This removes the current version of par and then, again on the command line, enter the following command

    ppm install http://www.bribes.org/perl/ppm/PAR.ppd
    and this will install the latest version of PAR (0.86 at time of writing)

    Plotinus