Re: Problem printing '%' with Text object

Bruce Sherwood <[email protected]>
Newsgroups gmane.comp.python.visualpython.user
Message-ID <[email protected]>
Glad you like the new stuff!

I was aware that & doesn't display in labels on Windows, and I don't
yet know the cause. It does display on Mac and Linux.

The problem with % is a simple mistake, which none of my tests
happened to uncover. In shapes.py the statement

totlen += (vector(contour[j])-vector(contour[j+1])).mag

should read

totlen += (vis.vector(contour[j])-vis.vector(contour[j+1])).mag

You can make this change yourself, and of course it will be
incorporated in future versions. It seems likely that as people try
the new extrusion machinery (and the text object which now shares the
same machinery) they'll find bugs of this kind. I'll wait a little to
see what turns up and then release 5.51. Thanks for the clear report.

Bruce Sherwood

On Tue, Feb 22, 2011 at 9:12 PM, Symion <[email protected]> wrote:
> First I would just like to congratulate Visual 5.50 developers.  Wow!
> Text and Extrusion are amazing!
>
> However there seems to be a problem displaying the "%" character with text
> object.
>
>
> from visual import *
> txt = text(text="%")
>
> Generates the following error!
>
> Traceback (most recent call last):
>   File "<pyshell#78>", line 1
>     txt = text(text="%")
>   File "C:\Python27\lib\site-packages\vis\primitives.py", line 687, in
> __init__
>     self.paintText()
>   File "C:\Python27\lib\site-packages\vis\primitives.py", line 715, in
> paintText
>     spacing=self.__spacing, vertical_spacing=self.__vertical_spacing)
>   File "C:\Python27\lib\site-packages\vis\shapes.py", line 854, in text
>     totlen = lenctr(contours[i])
>   File "C:\Python27\lib\site-packages\vis\shapes.py", line 844, in lenctr
>     totlen += (vector(contour[j])-vector(contour[j+1])).mag
> NameError: global name 'vector' is not defined
>
> Also...
>
> lab = label(text="&")
>
> The "&" character is unprintable.
> (I think I may have mentioned this for an earlier version of Visual.)
>
>
> ------------------------------------------------------------------------------
> Free Software Download: Index, Search & Analyze Logs and other IT data in
> Real-Time with Splunk. Collect, index and harness all the fast moving IT
> data
> generated by your applications, servers and devices whether physical,
> virtual
> or in the cloud. Deliver compliance at lower cost and gain new business
> insights. http://p.sf.net/sfu/splunk-dev2dev
> _______________________________________________
> Visualpython-users mailing list
> Visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/visualpython-users
>
>

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.