def set_font(font, section='main', option='font'):
 CONF.set(section, (option + '/family'), to_text_string(font.family()))
 CONF.set(section, (option + '/size'), float(font.pointSize()))
 CONF.set(section, (option + '/italic'), int(font.italic()))
 CONF.set(section, (option + '/bold'), int(font.bold()))
 FONT_CACHE[(section, option)] = font

def set_font ( font , section = 'main' , option = 'font' ) : CONF . set ( section , ( option + '/family' ) , to_text_string ( font . family ( ) ) ) CONF . set ( section , ( option + '/size' ) , float ( font . pointSize ( ) ) ) CONF . set ( section , ( option + '/italic' ) , int ( font . italic ( ) ) ) CONF . set ( section , ( option + '/bold' ) , int ( font . bold ( ) ) ) FONT_CACHE [ ( section , option ) ] = font
set font .