How to get proper international font in Text widget?
ok1fou at my-deja.com
ok1fou at my-deja.com
Wed Sep 13 06:38:53 EDT 2000
Hi,
I have the following same problem in Tkinter and Perl/Tk.
When running a Tk application in Windows, I can never make widgets like
Text use the correct font encoding (in this case Win-1250).
The question is how to set up the font and how to insert text so that
the result looks correct in Central/East European languages (e.g. Czech)
Example:
from Tkinter import *
c = Tk()
# the following displays correctly
c.title( 'Some text using Czech national characters')
t = Text(c, text="Some other text using Czech spelling")
t.pack() # displays Czech characters as garbage
t.config( font='{Arial CE}' ) # this font is supposed to be CP1250
# the text is still garbage despite the i18n-ized font
t.insert( END, "Some other Czech text") # still garbage
Would anyone know where to look for solution???
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list