devanagari fonts rendering in python-Tkinter
Closed / Invalid1560611fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 20 years ago
Descriptionplain2006-09-18 10:10:51
My email address is [email protected] Hi, I hope a tkinter question can be addressed here as well. I am trying to display Devanagari unicode fonts in a tkinter label/text widget. To make new characters, the unicode fonts provide this functionality of using combination of unicode codes to make a single new character. Like for instance the kSa in unicode is u'\u0915\u094D\u0937'. In Linux, this looks perfect in a web-browser or in my shell-konsole which supports unicode. I am using Python-2.4.2 which definitely supports unicode. But the problem is in the final visual rendering that it does not show the kSa character but shows it as k Sa as two separate characters. For example, u'\u0915\u093f'. u0915 stands for 'ka' the first consonant in devanagari. u093f stands for the third vowel 'i' pronounced as 'e' as in 'pre'. This vowel when combined to 'ka' must have a line+curve that visually looks like 'f' should be to the left of the consonant 'ka'. Though in windows, when I give u'\u0915\u093f', it renders correctly, in redhat linux, it shows the 'f' to the right which makes it look like it is adding the vowel to the next consonant in a word. Now there is also this another problem but both in windows and linux alike. The making of new characters like the kSa or using the Zero-Width-Joiner and Zero-Width-Non-Joiner to make half characters etc.... Is there by any chance these things could be correctly rendered?? I mean, I use PyQt, it correctly renders the fonts. But, PyQt needs Qt and getting Qt for Windows is a whole big story. So, I want to stick to Tkinter and try. Can you please suggest any method that would allow me to make the Tkinter-Python to give the correct visual rendering of the characters. We use the X11 fonts while running PyQt which I guess the Qt uses. If my xterm shell-konsole could render unicode fonts correctly, I would guess Python Tkinter as a GUI package must definitely be able to render the fonts correctly. please let me know if you can help me, if yes, then how?? Thanks in advance!! Cheers, -Siva.
nobodyplain2006-09-18 22:20:38
Logged In: NO One more comment I need to add is the reply I got from the Python help group. They mentioned that, it is because of the limitation of the Tcl/Tk and asked me to contact the Tcl/Tk help group. That is why I am here. Can you please suggest, if Tcl/Tk current or next version will support this kind of unicode rendering?? Or can you suggest some very simple thing that I could change to get this working like a iso10646-1.enc file??
dgpplain2006-09-19 00:11:52
Logged In: YES user_id=80530 Tk issues should be logged with the tktoolkit project.
Log in (anonymous is fine) to add a comment.