Font in tkinter / idle
Jon K Hellan
hellan at acm.org
Wed Feb 23 03:37:12 EST 2000
"Robert Hicks" <rhicks at rma.edu> writes:
> you want to edit EditorWindow.py:
>
> if sys.platform[:3] == 'win':
> text['font'] = ("verdana", 10)
> # text['font'] = ("courier new", 10)
>
Thanks. That doues it. Actually:
if sys.platform[:3] == 'win':
text['font'] = ("lucida console", 10)
else:
text['font'] = ("lucida typewriter", 12)
But according to eff-bot on Deja News, it should also be
possible to do it with X resources. I've tried things like
Idle*Text.Font: lucida typewriter 12
PyShell*Text.Font: lucida typewriter 12
PyShell.Font: lucida typewriter 12
And haven't found the right resource to set.
Anyway, I hate to change the source. Will have to reapply the change
next version. I suppose there must be a way to specify a default serif
font and a default sans serif font for Tk.
My color scheme for dark blue background looks like this (I use
background "#00005a"):
class ColorPrefs:
CNormal = "white", "#00005a"
CKeyword = "#a0ffff", None
CComment = "#ffb0b0", None
CString = "#e0e0a0", None
CDefinition = "#b2e4ff", None
CHilite = None , "darkolivegreen"
CSync = None, None
CTodo = None, None
CBreak = "#ff7777", None
CHit = "#ffffff", "#000000"
CStdIn = None, None
CStdOut = "gray90", None
CStdErr = "red3", None
CConsole = "yellow3", None
CError = None, "#ff7777"
CCursor = None, "gray75"
Thanks
Jon
More information about the Python-list
mailing list