width of a jit.gl.text3d object

pseudostereo's icon

Is there any way to determine the width (in opengl coordinates, or in pixels) of a given line of text in a given font (at scale 1 1 1) rendered by the jit.gl.text3d object?

The question has been posed on this forum several times, but as far as I can tell it has never been answered.

secco's icon

Hi pseudostereo,

I have the same problem now. Did you find a solution at that time?

Thanks
secco

pseudostereo's icon
Dan's icon

See jsui_screentoworld-example.pat in examples/javascript/ui.

HTH,
dan

secco's icon

thanks a lot. I'll try that.