Replies: 5 comments 2 replies
-
I'll shoot in the dark here (that's, I'll need your guidance afterwards): About the image above, is it showing Poppins font type weights? In order to test and to check font usage I created the code bellow (I have downloaded Roboto, since its available at no cost to Windows, Linux and MacOS, and I've installed system wide): import tkinter
import tkinter.font as Font
import customtkinter as ctk
class App(ctk.CTk):
def __init__(self):
super().__init__()
self.title("Test custom font")
self.resizable(height = 800, width = 600)
title = ctk.CTkLabel(self, text='Title', text_font="roboto-extralight 40 italic")
title.place(anchor="center", relx="0.5", rely="0.5")
a = App()
a.mainloop() To answer the question: I think you are having a problem with the order of the string and I'm guessing, that you got Arial as a result, because the option Poppins-black isn't valid, and tkinter returns the default font so your application doesn't break. |
Beta Was this translation helpful? Give feedback.
-
I tried this with import tkinter
import tkinter.font as Font
import customtkinter as ctk
class App(ctk.CTk):
def __init__(self):
super().__init__()
self.title("Test custom font")
self.resizable(height=800, width=600)
title = ctk.CTkLabel(self, text='Title', text_font="roboto-black 40 normal")
title.place(anchor="center", relx="0.5", rely="0.5")
a = App()
a.mainloop() |
Beta Was this translation helpful? Give feedback.
-
put in a tuple |
Beta Was this translation helpful? Give feedback.
-
Any update? |
Beta Was this translation helpful? Give feedback.
-
i have variable weights of fonts installed on my system, but i cannot access, for example, the
medium
orblack
variant of the font to show in myctkframe
. I can only access the regular and bold variants. How can this be resolved?title = ctk.CTkLabel(login_frame, text='Title', text_font='Poppins 20 normal',)
--> works finetitle = ctk.CTkLabel(login_frame, text='Title', text_font='Poppins-black 20 normal',)
--> shows arial fontBeta Was this translation helpful? Give feedback.
All reactions