[Tutor] OT Text size in IDLE on Linux

Daniel Yoo dyoo@hkn.eecs.berkeley.edu
Thu, 12 Oct 2000 21:21:50 -0700 (PDT)

On Thu, 12 Oct 2000, Nate Bargmann wrote:

> I've asked this on the newsgroup and the best response I received was
> to use the CVS version of Python!  I'm using a laptop which has a display
> locked to 1024x768.  The default text in IDLE is quite small (8 pt I
> think) and even my relatively young eyes are having a tough go at it
> at times.  How might I tell IDLE or Tkinter to enlarge the text?  I
> am using IDLE 0.5 with Python 1.5.2 on Debian GNU/Linux 2.2.  All help is
> appreciated.

If you have access to EditorWindow.py in the IDLE source directory, look
around on line 130:

        if sys.platform[:3] == 'win':
            text['font'] = ("lucida console", 8)

Note: that's how they set it for the window console.  However, IDLE's just
depending on the default for the linux side.  Let's change the default: 

        if sys.platform[:3] == 'win':
            text['font'] = ("lucida console", 8)
        text['font'] = ("fixed", 20)  # Added by dyoo

If we manually set the font, it should be much more readable.

Note: I just did this to make it work;  I know this is bad, since we're
hardcoding the font.  The CVS version, I'm guessing, adds a menu option to
do this font changing, so you don't have to muck through code like we
just did.

Anyway, hope this helps!