(self, root, configType, section)
return (family, size, 'bold' if bold else 'normal')
Retrieve a font from configuration (font, font-size, font-bold)
        Intercept the special value 'TkFixedFont' and substitute
        the actual font, factoring in some tweaks if needed for
        appearance sakes.

        The 'root' parameter can normally be any valid Tkinter widget.

        Return a tuple (family, size, weight) suitable for passing
        to tkinter.Font
Retrieve a font from configuration (font, font-size, font-bold)
        Intercept the special value 'TkFixedFont' and substitute
        the actual font, factoring in some tweaks if needed for
        appearance sakes.
Retrieve a font from configuration ( font font - size font - bold ) Intercept the special value TkFixedFont and substitute the actual font factoring in some tweaks if needed for appearance sakes .
def GetFont(self, root, configType, section):
        """Retrieve a font from configuration (font, font-size, font-bold)
        Intercept the special value 'TkFixedFont' and substitute
        the actual font, factoring in some tweaks if needed for
        appearance sakes.

        The 'root' parameter can normally be any valid Tkinter widget.

        Return a tuple (family, size, weight) suitable for passing
        to tkinter.Font
        """
        family = self.GetOption(configType, section, 'font', default='courier')
        size = self.GetOption(configType, section, 'font-size', type='int',
                              default='10')
        bold = self.GetOption(configType, section, 'font-bold', default=0,
                              type='bool')
        if (family == 'TkFixedFont'):
            f = Font(name='TkFixedFont', exists=True, root=root)
            actualFont = Font.actual(f)
            family = actualFont['family']
            size = actualFont['size']
            if size <= 0:
                size = 10  # if font in pixels, ignore actual size
            bold = actualFont['weight'] == 'bold'
        return (family, size, 'bold' if bold else 'normal')
def GetFont ( self , root , configType , section ) : family = self . GetOption ( configType , section , 'font' , default = 'courier' ) size = self . GetOption ( configType , section , 'font-size' , type = 'int' , default = '10' ) bold = self . GetOption ( configType , section , 'font-bold' , default = 0 , type = 'bool' ) if ( family == 'TkFixedFont' ) : f = Font ( name = 'TkFixedFont' , exists = True , root = root ) actualFont = Font . actual ( f ) family = actualFont [ 'family' ] size = actualFont [ 'size' ] if size <= 0 : size = 10 # if font in pixels, ignore actual size bold = actualFont [ 'weight' ] == 'bold' return ( family , size , 'bold' if bold else 'normal' )