title: How can I change the default font of a Tkinter application during the mainloop?
body: <p>How can I change the default font of a Tkinter application during the mainloop?</p>
  <p>I would like to have a button in my application where the user can increase or decrease the font of all the widgets. Currently, I'm just changing the default font size of root right at the beginning, but I haven't been able to modify the font size after the application is running.</p>
  <p>I'm aware that Tkinter allows you to change the default using root.option_add(&quot;*Font&quot;, font), but how can modify the font while the application is running?</p>
  <p>Here is an example of what I am trying to do:</p>
  <pre><code>import tkinter as tk
  
  class Application(tk.Frame):
  
      def __init__(self, master=None):
          super().__init__(master, bg= &quot;#E3E5E6&quot;)
          self.master = master
          
          self.grid(sticky = &quot;NESW&quot;)
          
          
          self.menubar = tk.Menu(self)
          
          
          fileMenu = tk.Menu(self.menubar)
          fileMenu.add_command(label=&quot;Change Font Size&quot;, command =self.changeFontSize)
        
          self.menubar.add_cascade(label = &quot;Click Me&quot;, menu = fileMenu)
          
          self.master.configure(menu=self.menubar)
  
          text = &quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&quot;
  
          self.messageWidgetExample = tk.Message(text = text)
          self.messageWidgetExample.grid()
        
      def changeFontSize(self):
          print(&quot;Change Font Size&quot;)
          self.master.option_add(&quot;*Font&quot;, &quot;calibri 8&quot;) 
          self.master.update()
  
          # Doesn't work either
          # self.messageWidgetExample.update()
       
  root = tk.Tk()
  
  root.grid_rowconfigure(0, weight=1)
  root.grid_columnconfigure(0, weight=1)
  root.option_add(&quot;*Font&quot;, &quot;calibri 14&quot;)
      
  app = Application(master=root)
  app.mainloop()
  </code></pre>