world size of text in jit.gl.text3d

Peter Nyboer's icon

i'm trying to figure out if it's possible to figure out how big a line of text is in jit.gl.text3d, for example, if I send the message "text Hello" using the font Arial, is there a way to know that the left edge of the "H" is at coordinate , the right edge of the "o" is at another x coordinate, and similarly for top/bottom?
I looked into the matrix output of jit.gl.text3d, but it seems nonstandard. it's an 8plane nx1 matrix - I'm not sure which each plane means. only planes 0,1,3,and 4 seem to change much.

Any thoughts?

P.

nesa's icon

Hi Peter,

the matrix contains vertex coordinates, so I guess it would be really
hard to deduce which vertex belongs to which letter.

You can find out the width and height (well depth too) of all letters
in jit.gl.text3d-matrix using jit.3m, but I guess that then you have
to apply scale, position,rotation+world2screen transformations to
find out it's pixel size.

Cheers,
nesa

On Sep 13, 2007, at 9:52 PM, pnyboer wrote:

>
> i'm trying to figure out if it's possible to figure out how big a
> line of text is in jit.gl.text3d, for example, if I send the
> message "text Hello" using the font Arial, is there a way to know
> that the left edge of the "H" is at coordinate , the right edge
> of the "o" is at another x coordinate, and similarly for top/bottom?
> I looked into the matrix output of jit.gl.text3d, but it seems
> nonstandard. it's an 8plane nx1 matrix - I'm not sure which each
> plane means. only planes 0,1,3,and 4 seem to change much.
>
> Any thoughts?
>