Fixed is a bitmapped font and only supports a few predetermined sizes. It will select the size that is closest to the requested size. The largest size supported seems to be about 70. On my (WinXP) system, once you get above 121, it turns to Helvetica.

Here's a little utility I wrote to mess around with fonts and sizes. Use the up and down arrows to change the size quickly.

#!/usr/bin/perl use strict; use warnings; use Tk; use Tk::BrowseEntry; my $fontname = 'Times'; my $fontsize = 200; my $top = MainWindow->new; my $cframe = $top->Frame->pack(-anchor => 'w'); my $label = $top->Label( -text => 'This is a label', -font => "{$fontname} $fontsize", )->pack; my $sizelabel = $cframe->Label( -text => $fontsize )->grid(-row => 1, -column => 3, -padx => 2); my $fontlist = $cframe->BrowseEntry( -label => 'Font', -browsecmd => sub{ fontconfig($label, $fontname, $fontsize) }, -variable => \$fontname, )->grid(-row => 1, -column => 1, -padx => 8); $fontlist->insert ('end', sort $top->fontFamilies); my $smaller = $cframe->Button( -text => 'Smaller', -command => sub{ $fontsize--; fontconfig($label, $fontname, $fontsize); $sizelabel->configure(-text => $fontsize); }, )->grid(-row => 1, -column => 2, -padx => 2); my $bigger = $cframe->Button( -text => 'Bigger', -command => sub{ $fontsize++; fontconfig($label, $fontname, $fontsize); $sizelabel->configure(-text => $fontsize); }, )->grid(-row => 1, -column => 4, -padx => 2); $top->bind('<Up>' => sub{$bigger->invoke}); $top->bind('<Down>' => sub{$smaller->invoke}); $top->focus; MainLoop; sub fontconfig{ my ($widget, $fontname, $fontsize) = @_; $widget->configure(-font => "{$fontname} $fontsize"); } __END__

In reply to Re: Huge font in perl Tk by thundergnat
in thread Huge font in perl Tk by nyk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.