Re: Outline font rendering
- From: Wolfgang Draxinger <wdraxinger@xxxxxxxxxxxxxxxx>
- Date: Fri, 13 Jul 2007 22:21:04 +0200
patrick.pasteels@xxxxxxxxxxxxxxxx wrote:
The problem I'm facing is anti-aliasing. When I use "glEnable
(GL_POLYGON_SMOOTH)", all triangles of the tesselated
characters are anti-aliased, and this leads to artefacts inside
the plotted characters.
fungus already gave you an awnser about that. This technique is
outdated and obsolete. Using FSAA is one option, but you should
also consider to render the text with a font rendering library -
Freetype2 comes to mind - and upload the result as a texture.
Especially if you want to render Unicode text this is the only
manageable approach - texture mapped fonts are a no-go with
Unicode, since this would require to prepare a large texture for
2^16 characters. You could save a lot by testing the to be
rendered text, which characters will appear, but then you'll
have to create a font texture for each text you intend to
display. And for languages like chineese you're out of luck
anyway. But using a font renderer like Freetype2, to render the
text into a texture (eventually using a layout library like
Pango) will cost only little memory (a bit more than for a 7 bit
ASCII texture mapped font) but the benefit is, that you get a
really crisp text appearance (far better than texture mapped
fonts, or tesselated fonts). And you should not forget, that the
displayed text will not change rapidly. Eventually you will
scroll it, or change it, but only at considerably low rates, at
which the (short) delay of updating with glTexSubImage won't be
noticeable - and don't forget, that any textual update will
oftenly change just a limited area in the rendered image, so an
update of the affected area only is suffcient.
You might also be interested in a recently developed technique
called "vector textures".
Wolfgang Draxinger
--
E-Mail address works, Jabber: hexarith@xxxxxxxxxx, ICQ: 134682867
.
- References:
- Outline font rendering
- From: patrick . pasteels
- Outline font rendering
- Prev by Date: Re: Question about pixelformats and WGL_COLOR_BITS_ARB.
- Next by Date: clearing buffers in OpenGL
- Previous by thread: Re: Outline font rendering
- Next by thread: Question about pixelformats and WGL_COLOR_BITS_ARB.
- Index(es):
Relevant Pages
|