Advertisement

Text Shape

Started by July 13, 2001 08:05 AM
0 comments, last by suresh kannan 23 years, 7 months ago
Hi, I am displaying text using wglUseFontOutlines(...) function with True Type fonts and I am using the following options also. glShadeModel(GL_SMOOTH); glEnable(GL_POLYGON_SMOOTH); glHint(GL_POLYGON_SMOOTH_HINT , GL_NICEST); But the shape of the text is not perfect. The text quality is also not good. I want to display text with 3D effect with perfect shape. Please send your suggestions. Thanks, Kannan A S
I don''t think the glHint() will make much difference. btw, what does the glEnable(GL_POLYGON_SMOOTH) do?

I think you''re problem''s with the font deviation. When you call wglUseFontOutlines() one of teh parameters is the deviation. You need to set this to 0 for perfect text (probably a very high number of polygons), 0.05 is noticeably less good but it''s probably acceptable (I think, it''s while since I''ve dealt with Windows fonts), 0.1 is quite bad.

The following is Delphi code. Just replace the . with a -> to convert it into C++

wglUseFontOutlines(h_DC, 0, // starting character
255, // num display lists to create
Fonts[NumFonts].base,// starting list
Deviation,// deviation from real outline allowed (0 perfect, 0.1 very wonky)
Depth,// thickness
WGL_FONT_POLYGONS,// polygons, not lines
@gmf);

I notice no-one else has replied so I hope this helped

This topic is closed to new replies.

Advertisement