Why I can’t change font in Label, but in Button i can (Tkinter.ttk)

Solution for Why I can’t change font in Label, but in Button i can (Tkinter.ttk)
is Given Below:

Well, as in topic, why I can’t change font in Label using ttkbootstrap, but in Buttons everything works fine?

And second question, is there some documentation that lists all of the things that I can change in ttk stylesheet? Like eg background color (as in ttkbootstrap is somehow done), because everywhere I searched, was mentioned ’bout background which only changed a “frame” of a button.

Here’s a problematic code:

import tkinter as tk
from ttkbootstrap import Style as StyleBs
import tkinter.ttk as ttk

cfg = {
"args_label" : {
    "style" : "TLabel",
    "text" : "Label 12345",   
    },
"args_button" : {
    "style" : "TButton",
    "text" : "Button 12345",   
    },
}

if __name__ ==  "__main__" : 
    root = tk.Tk()
    style = StyleBs("darkly")

    style.configure('TButton', font=('Times New Roman', 21), foreground = "red")  # foreground is changed, font too
    style.configure('TLabel', font=('Times New Roman', 21), foreground = "red")   # foreground is changed, but font is not

    button = ttk.Button(root, **cfg["args_button"], ).grid(row=0, column = 0)
    label = ttk.Label(root, **cfg["args_label"], ).grid(row=1, column = 0)
    
    root.mainloop()

The following code worked for me, if you import Style from tkinter instead of ttk.bootstrap you may have an easier time.

I’m not sure why the button and label text, as well the style names were in a dictionary, that’s new on me.

By removing the dictionary and simply placing the desired text and style name inside the button and label builds, it’ll meet your requirements.

from tkinter import Tk, Button, Label, ttk
from tkinter.ttk import Style

root = Tk()

#Assigning variable to Style import
style = ttk.Style()

#Building Button and Label in window
button = ttk.Button(root, text="Button 12345", style="ButtonStyle.TButton").grid(row=0, column = 0)
label = ttk.Label(root, text="Label 12345", style="LabelStyle.TLabel").grid(row=1, column = 0)

#Configuring style to be used by window
style.configure('ButtonStyle.TButton', font=('Times New Roman', 21), foreground='red')
style.configure('LabelStyle.TLabel', font = ('Times New Roman', 21), foreground = 'red')

root.mainloop()