Pixel Lenght of 3DFont

By using wglUseFontOutlines(),I have draw a text in 3D font,now i wants to calculate the PixelLenght of that text in given format.

Hi !

There is no way to do that with OpenGL, you have to calculate it on your own using GDI functions.

GetTextExtent(Ex) might be of some help.

Mikael

Also remember that an outline font does not have a “pixellength” it’s just a set of polylines or triangle(strips/fans), so the length depends on how you display it in OpenGL to.

Mikael

Hello mikael_aronsson,
I think you are correct,but what do mean by “so the length depends on how you display it in OpenGL to”,it means the lenght is equal to starting co-ordinates of text to end co-ordinates of text in OpenGL Co-ordinate system after that I have to calculate the pixellenght by pixel mapping?