About error of display a text in fos/examples/text.py

3 views
Skip to first unread message

Bao Thien

unread,
Oct 12, 2012, 11:04:07 AM10/12/12
to fos-...@googlegroups.com
Hi guys,

I try to run the text.py in fos/examples to display a text.
But it is not stable. Some time, it works well, sometime, the error "ValueError: operands could not be broadcast together with shapes" appears.
For example, when I try 
    tex = Text3D( "Text3D", vert, "Reg", 10, 2, ptr)  --> work well
but with 
   tex = Text3D( "Text3D", vert, "Right", 10, 2, ptr)  --> ValueError
   the error exactly comes from the file fos/actor/text.py at the command line Z[y:y+h,x:x+w] |= np.array(bitmap.buffer).reshape(h,w).
The error is about the shapes (0,34) (73,34) (0,34), so it can not reshape.
After trying many time, I found that only some words ending with 'g' character, the program runs well.

Is there anyone can suggest me some clues for fixing it?

Thank you for your help.

Best,

Thien Bao

-- 
Nguyen Thien Bao

Eleftherios Garyfallidis

unread,
Oct 15, 2012, 3:22:33 PM10/15/12
to fos-...@googlegroups.com
Okay we found the error. It was in the calculation of the height of the bitmap. We will commit the correction asap.

Cheers,
Eleftherios & Bao 

--
 
 

Reply all
Reply to author
Forward
0 new messages