Proton
unread,Jan 31, 2012, 3:26:52 AM1/31/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pyglet-users
Hi all,
I'm currently writing a simple game, and used pyglet.text.layout,
but the 2 things below makes me crazy ->
:: layouts have an attribute called 'wrap', if true, layout will break
long lines from spaces,
if a single long word exceeds layout width, it won't snap but just
overflow.
This may not be a problem for English(or sth. similar) users, since
there's always spaces,
but for chinese it won't wrap at all.
I tried to insert ZWSP(Zero width space) character after chinese
chars, but they appear as
little boxes, not 'zero width'
:: Is there any means to add attributed/html text to a document
incrementally?
pyglet.text.decode_attributed always return a new document,
if i want to append some more text, i have to
decode_attributed(the_whole_text + new_text),
and the speed is unacceptable.
currently i use a custom grammar to achieve the same effects.