ttk.Combobox 中的默认字体样式

Default font style in ttk.Combobox

我正在使用 ttk.Combobox 构建 GUI。我想知道这里任何文本的默认字体名称和字体大小是多少。

使用 ttk.Styletkinter.font。不知道有没有更短的路。

import tkinter as tk                                                   
from tkinter import ttk                                                
from tkinter import font

root = tk.Tk()    # font won't work before the Tk object is created

s = ttk.Style()                                    # Create a Style object
combo_font_name = s.lookup( 'TCombobox', 'font' )  # Lookup the name of the default Combobox font

c_font = font.nametofont( combo_font_name )        # Find the font object for that font
c_font.actual()                                    # Dictionary of attributes

# For my PC
# {'family': 'DejaVu Sans',
#  'size': 10,
#  'weight': 'normal',
#  'slant': 'roman',
#  'underline': 0,
#  'overstrike': 0}