Re: Outline font rendering



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

.



Relevant Pages

  • font used by tk_dialog not settable?
    ... the non-ASCII characters are not rendered but show ... I am using a UTF-8 locale and get the same characters to render ... is that tk_dialog is using a font that lacks these characters. ... possible to control the font of a tk_dialog widget? ...
    (comp.lang.tcl)
  • Re: Render fonts in opengl?
    ... One method is to render the text into GL texture and then apply ... with OpenGL texture mapping to render it to screen. ... The other two methods are using Bitmap font and Primitive font. ...
    (comp.graphics.api.opengl)
  • antialiased bitmap fonts for X11
    ... under the X11 system, one can find various bitmap fonts, and also ... with the help of the X11 server RENDER extension and the Xft library. ... I have not found a ultimately good font (according to my own ... include at least all latin-1 characters, ...
    (comp.fonts)
  • Re: Charset?
    ... that page says that the font i'm using should support the ... characters i'm trying to render. ...
    (comp.lang.java.gui)
  • Re: Movie Rendering in Direct3D
    ... still, read up on filters, and managing filter graphs. ... >> InitGeometry, and Render. ... >> gets a pointer to the base filter from the texture renderer filter, ... >> adds the source filter to the graph ...
    (microsoft.public.win32.programmer.directx.graphics)