This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients gpolo, kbk, petr.viktorin, roger.serwy, serhiy.storchaka, terry.reedy, wysaard
Date 2016-04-11.21:47:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
#24745 changed the default fixed font from Courier to TkFixedFontin 3.5.0, 3.4.4, and 2.7.11  when using tcl/tk 8.5+.  On some OSes, the latter is not Courier and looks much better.  I don't know why the two behave differently on some systems.

Since this is not a unique problem on one machine, I am reopening this to at least provide a workaround.  Regardless of ultimate cause, we can at least force a blank font size to a default int string, such as '10'.  I closed #24951 as a duplicate of this.

In class idlelib.configDialog.ConfigDialog, method CreatePageFontTab (line 114) creates StringVar self.fontSize, initialized to ''.  The Var is passed to class dynOptionMenuWidget.DynOptionMenu(tkinter.OptionMenu). The instance is bound to self.optMenuFontSize.  Method LoadFontCfg (line 963) sets retrieves the current Editor font as local name configeredFont and local fontSize therefrom. It passes fontSize to self.optMenuFontSize.SetMenu.  This in turns sets the stored self.fontSize to the passed in fontSize, overwriting the initial value.

(The OptionMenu.__init__ docstring and suggest that the variable must be a StringVar, which I presume is why self.fontSize is.  Experiment suggest otherwise in 8.6.  This would have to be verified on 8.5 and even 8.4 before changing to IntVar.)

If my understanding based on the above, fontSize must be set to '' when the current font is TkFixedFont, but not when the font is Courier.  Petr, could you confirm by adding "print(configuredFont, fontsize)" to LoadFontCfg after both names are set and running both buggy and good cases?
Date User Action Args
2016-04-11 21:47:39terry.reedysetrecipients: + terry.reedy, kbk, gpolo, roger.serwy, petr.viktorin, serhiy.storchaka, wysaard
2016-04-11 21:47:39terry.reedysetmessageid: <>
2016-04-11 21:47:39terry.reedylinkissue26673 messages
2016-04-11 21:47:39terry.reedycreate