Faster display of text
Laurent Szyster
laurent.szyster at q-survey.be
Sun Jan 20 20:43:09 EST 2002
hi Salim,
i think the problem is with tkinter or in the library it uses
to display text on your platform. the reason is that often
bi-directional fonts is an add-on to most computer platform.
here is a pointer about Python Internationalization
http://www.python.org/workshops/1997-10/proceedings/loewis.html
about tkinter and arabic, here's what Google returns:
http://www.itworld.com/AppDev/1182/UIR010302regex/
http://mini.net/tcl/699.html
hopes this can help.
Laurent
Salim Zayat wrote:
>
> Hey there. I am writing this tree-drawing application in tkinter which
> is meant to display arabic text. The only problem is that it is
> extremely slow in printing all the arabic text to the Canvas widget which
> does all the displaying. When I replace the arabic text with regular
> English strings, it works markedly faster. Is this a problem with my
> encoding of it (currently \x escape encoded) or is it merely in Python's
> manner of displaying other languages?
>
> For what it's worth, I am never sure in the program whether the text I am
> to display will be English or Arabic, so I just pass it straight through
> every time to the canvas:
>
> canvas.create_text(xpos, ypos, text=whatever that chunk is).
>
> Is this too inefficient?
>
> Sorry about all the writing. Thanks!
>
> Salim
More information about the Python-list
mailing list