freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freetype] Can I get FreeType to generate a bitmap (not including th


From: Henry Maddocks
Subject: Re: [Freetype] Can I get FreeType to generate a bitmap (not including the space around it) of a specified size?
Date: Tue, 14 Aug 2001 09:10:30 +1200

Your point about mipmapping is correct. gluBuild2DMipmaps will cause you problems with fonts. The problem being glu doesn't know what is important detail so you can lose a lot. As you said it's best to generate your own or not use glmipmaps at all.

Good point about the voodoo card. 256x256 was a pain:) I'm currently working on improving my texture font stuff by getting it to automatically use as many textures as it needs to render the requested bitmaps. ie if you set the maxtexture size to 256 and the glyphs wont all fit on the texture it will build extra ones until all the glyphs have been processed. This will slow down performance (extra texture binds) a bit but will allow much higher quality textures. I also want to improve my fitting algorithm, at the moment there is a lot of empty space.
Another optimisation i am going to add will be the ability to use a restricted set of glyphs ie if you know at start up that you only need the 26 capitals, or maybe just the numbers, you can tell my lib to only process them and ignore the rest. This will let you use bigger glyphs in the same texture area.

Henry

PS. If you want to be able to zoom by large amounts, polygon fonts may be a better answer. Using textured quads (or pixmaps) you may hit the fillrate limit. Plus polygon fonts will stay crisp at any magnification. The problem you may have though is antialiased edges, I can't remember if the voodoo3 had antialiased (GL_SMOOTH_LINES) lines?

On Monday, August 13, 2001, at 11:21 PM, Niklas Hoglund wrote:

This may be problematic on my hardware (Voodoo3) that has rather
limited maximum texture size. (256x256 pixels or something like
that). I want to be able to zoom right up to the character and still
have it look smooth and fine. The way I do it now works pretty well,
but the appearance could be better. I'm thinking of using FreeType to
render all mipmap levels to get better appearance when the font is
zoomed out. (Currently I use gluBuild2DMipmaps which scales the
bitmap I give it to a ^2 size, and then averages pixels together to
generate the smaller versions. Bitmap scaling can't be good for the
resulting quality. Sometimes I see artifacts I think come from this.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
reply via email to

[Prev in Thread] Current Thread [Next in Thread]