TkinterEP / python-tkextrafont

C-extension for Tcl to allow loading custom font files into Tcl/Tk applications, packaged for Python's Tkinter
MIT License
21 stars 3 forks source link

unable to set font size #6

Open unknown-kel opened 1 year ago

unknown-kel commented 1 year ago

how can i set the font size, seems its not working

rdbende commented 1 year ago

Hi! Have you tried examples/example.py? It works fine for me.

If yes, could you share an minimal reproducible example of your code?

unknown-kel commented 1 year ago

Yh thanks,

I figured it out in a different way Actually I'm using customtkinter

DataReset commented 1 year ago

unknown-kel, pls help me, I'm using customtkinter too, but i cant load 'Oswald'

font = Font(file='Oswald-ExtraLight.ttf')
assert font.is_font_available("Oswald")
assert "Oswald-ExtraLight" in font.loaded_fonts()
assert font.font_info("Oswald-ExtraLight.ttf")[0]["copyright"]
self.name = customtkinter.CTkLabel(self, text='Main', font=customtkinter.CTkFont('Oswald-ExtraLight', 15)).place(x=50, y=1)

I get assertion error

assert font.is_font_available("Oswald")
AssertionError

what i'm doing wrong?

rdbende commented 1 year ago

And with assert font.is_font_available("Oswald-Extralight")?

DataReset commented 1 year ago

i used another font and it works fine thanks !