2222import sys
2323
2424from configparser import ConfigParser
25- from tkinter import TkVersion
2625from tkinter .font import Font , nametofont
2726
2827class InvalidConfigType (Exception ): pass
@@ -713,16 +712,13 @@ def GetFont(self, root, configType, section):
713712 bold = self .GetOption (configType , section , 'font-bold' , default = 0 ,
714713 type = 'bool' )
715714 if (family == 'TkFixedFont' ):
716- if TkVersion < 8.5 :
717- family = 'Courier'
718- else :
719- f = Font (name = 'TkFixedFont' , exists = True , root = root )
720- actualFont = Font .actual (f )
721- family = actualFont ['family' ]
722- size = actualFont ['size' ]
723- if size <= 0 :
724- size = 10 # if font in pixels, ignore actual size
725- bold = actualFont ['weight' ]== 'bold'
715+ f = Font (name = 'TkFixedFont' , exists = True , root = root )
716+ actualFont = Font .actual (f )
717+ family = actualFont ['family' ]
718+ size = actualFont ['size' ]
719+ if size <= 0 :
720+ size = 10 # if font in pixels, ignore actual size
721+ bold = actualFont ['weight' ] == 'bold'
726722 return (family , size , 'bold' if bold else 'normal' )
727723
728724 def LoadCfgFiles (self ):
@@ -740,7 +736,7 @@ def SaveUserCfgFiles(self):
740736idleConf = IdleConf ()
741737
742738# TODO Revise test output, write expanded unittest
743- ### module test
739+ #
744740if __name__ == '__main__' :
745741 def dumpCfg (cfg ):
746742 print ('\n ' , cfg , '\n ' )
0 commit comments