Non-breaking Space Characters, Word Wrap

Hi,

I’m hoping someone can help fill me in on Panda’s support/use of non-breaking space characters, specifically with relation to the Word wrap function within onscreentext. I can’t seem to find a character, so far, that is respected by the wordwrap function in this regard. Thanks in advance!

Also, this may be important, I am tied into panda3d version 1.3.2.

The Unicode non-breaking space character is U+00A0, or \xa0 in Python.

David

Hrm - I’ve tried every character code I can find for NBSP without any luck so far ( including the one above ). I believe that I’m using utf-8 encoding throughout the lifecycle of my documents. So, I must assume that either my encoding is being converted/corrupted somewhere along its path to the engine or there is a lack of support for this in the wordwrap functionality. Since no one is shouting that this is unsupported I’m going to lean to the corruption side of things.

Thanks for the response David. If anyone has any experience with this, I’d appreciate any input you have. Thanks again.

Oh, sorry. If you’re using utf-8 encoding, use ‘\xc2\xa0’ to encode U+00A0.

This has nothing to do with Panda support. The wordwrap code simply considers U+00A0 to be a printable character like any other, but it looks like a blank space in the font. Of course, this does require that you use a font that contains this character. If you get messages about missing characters in the font, then either you didn’t encode U+00A0 (character 160 decimal) correctly, or that character isn’t in your font.

David