Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Perl Tk -font option is not working in linux if the language is japanese

by zentara (Archbishop)
on Nov 08, 2012 at 11:01 UTC ( #1002874=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Perl Tk -font option is not working in linux if the language is japanese
in thread Perl Tk -font option is not working in linux if the language is japanese

Your code works for me here. I think you are missing the font you specified. This works, 2 labels shown, both Japanese, different fonts.

#!/usr/bin/perl use warnings; use strict; use Tk; my $mw=tkinit; $mw->fontCreate('big', -family=>'arial', -weight=>'bold', -size=> 38 ); my $string = "\x{65E5}\x{672C}\x{8A9E}\x{306E}\x{3072}\x{3089}\x{304C} +\x{306A}\x{6F22 }\x{5B57}\x{3068}\x{30AB}\x{30BF}\x{30AB}\x{30CA}"; my $label = $mw->Label(-bg => 'white', -text => $string, -font => 'big')->pack(); my $label1 = $mw->Label(-bg => 'white', -text => $string, -font => "-adobe-helvetica-regular-r-normal-*-1 +2-*-*-*-*-*-*-*")->pack(); MainLoop;

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh


Comment on Re^3: Perl Tk -font option is not working in linux if the language is japanese
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1002874]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2015-07-04 10:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (59 votes), past polls