Akascape / CTkDesigner-Support

Support page for CTkDesigner - GUI design app for customtkinter
https://ko-fi.com/s/6fca1ae70f
Other
88 stars 0 forks source link

RTL widget #34

Open NZ62AN opened 12 hours ago

NZ62AN commented 12 hours ago

Hi, Right-to-left texts are not displayed correctly in the label widget, but they work correctly in tkinter. I'll provide the codes for you.

Customtkinter:

    self.label = customtkinter.CTkLabel(self,
                                        text='پروفایل شماره 1',
                                        width=40,
                                        height=28,
                                        fg_color='transparent',
                                        anchor='e'
                                        )
    self.label.place(x=223, y=178)

Tkinter:

    self.label = tk.Label(self, 
                          text='پروفایل شماره 1', 
                          bg=self.cget("bg"), 
                          fg="white",
                          font=("TkDefaultFont", 12), 
                          anchor='e')
    self.label.place(x=223, y=178)
Akascape commented 10 hours ago

@NZ62AN It is an issue with the font used, in customtkinter the default font is Roboto which lacks the RTL support. So, you can simply change the font like this: font=customtkinter.CTkFont('', size=13) or through CTkDesigner font params.

NZ62AN commented 1 hour ago

Thank you.