I am using Tkinter for a GUI in which is also show Matplotlib graphs. I am trying to align the way how text looks between Tkinter (e.g. Label) and Matplotlib (e.g. graph title, axis labels). To try it out I have set both to Arial with the following commands:
import matplotlib
import ttkbootstrap as ttk
matplotlib.rcParams.update({"font.family": "Arial"}) # Matplotlib
defaultFont = ttk.font.nametofont('TkDefaultFont') # Tkinter (more specifically Ttk Bootstrap)
defaultFont.configure(family = 'Arial')
However, it seems like the font is somewhat 'bolder' for Tkinter (although its not set to bold
or anything. You can see that in screenshot below, where upper text is a Tkinter Label and below is the title of a Matplotlib graph. Any idea why I am seeing this difference? I would really want to 1:1 use the same font face everywhere.