python - Bengali font is broken on Idle and Tkinter app -
i want display bengali text in tkinter label or message widget showing box things instead of text.
have tried installing different font in system , applying them on code nothing working. should display text in bengali font.
system detail- ubuntu 16.04, python 3.5
from tkinter import * tkinter import ttk root = tk() msg=message(root,text='আনন্দবাজার') msg.config(font=('lohit bengali', 54)) msg.pack() root.mainloop()
you first need determine whether tcl/tk knows , can access 'lohit bengali'. run idle , click options => configure idle , @ font list. or run
import tkinter tk root = tk.tk() tkinter import font fams = font.families() print('lohit bengali' in fams) # answer question above print() fam in sorted(fams): # see tcl know print(fam)
edit: add parens families call
Comments
Post a Comment