mikepol has asked for the wisdom of the Perl Monks concerning the following question:
Hi Everyone,
I've had some trouble dealing with fonts in TK. What I want to do is query some widget for its current font, increase that font size and set the widgets font to this new font. I use $widget->configure('-font')->[4] to get the current font. But back I get the string "Courier -12". The question is: how do I interpet that string? I don't want to parse it myself because it can be something completely different. In fact, if I run my program with -font 24x12, I get the string "24x12". Is there a way that I can query a widget for its font and then safely parse that string into its family, size, etc.?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: increase font size in Perl TK
by zentara (Cardinal) on Aug 04, 2011 at 10:58 UTC | |
|
Re: increase font size in Perl TK
by cmv (Chaplain) on Apr 26, 2016 at 18:19 UTC |