Re: FreeType

Andras Balogh <[email protected]> Sun, 1 Jan 2006 22:13:15 -0700
Newsgroups gmane.games.devel.general
Message-ID <[email protected]>
Brian,

I'm not sure exactly where your problem is. Do the generated glyphs
look bad themselves? Or do they look bad only when rendered on screen?
Anyways, I used to have a pretty bad font renderer too, here are some
links that helped me perfect it:

About ClearType font rendering:
http://grc.com/ctwhat.htm
ClearType is absolutely great, but it only works in 2D pixel perfect
rendering, as soon as you get some perspective, or stretch, you are
gonna miss pixels, and it ruins the whole idea of ClearType. Another
problem is, that the Windows text renderer creates a true color image
for cleartype, and there's no alpha information. And it's not obvious
how to combine those 1/3 pixel parts when blending it on a non-solid
background..

About texture fonts:
http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=3;t=009649
Look for Jon's (jwatte) posts, the truth is with him. ;) I also
thought that glyph based rendering was the way to go, until I've found
this thread. Rendering entire words is definitely a superior approach.
Especially, if you need support for arabic, chinese or cirillic
languages. Windows text rendering is very fast, and async texture
uploads (via PBO) are very efficient.

About texture filtering:
http://www.mindcontrol.org/~hplus/graphics/opengl-pixel-perfect.html
And so far, I haven't seen any drivers that would not conform to this..

Oh, and here's a great utility to check that everything is pixel
perfect (much better than Windows' built-in magnifier):
http://magnifier.sourceforge.net/

Hmm, one more thing: when rendering text on top of a 3D scene, then
you'll need shadows to make the font readable in every situation. I
prefer one pixel thick crisp hard shadow around the text, but you can
also compute soft shadows easily during the texture generation. Now,
do this with a glyph based renderer. :)


Hope this helps,



Andras



Sunday, January 1, 2006, 9:03:41 PM, you wrote:

> Thread necromancy!

> I've started using FT2 via PyGame, and the font rendering...sucks.
> I'm sticking with Courier New on the Windows platform and generating
> glyphs, anti-aliased, into

> At least two problems have surfaced.  The first is that the fonts just
> don't look that good compared to the built-in Windows renderer, which
> presumably uses ClearType or something similar (using zoomin the
> difference is fairly obvious).

> The second problem, which is not FT2 specific, is that it seems that
> where I need to index my texels differs from driver to driver.  On
> some drivers I need to go from 0,0 to glyph.width,glyph.height, and on
> other drivers I need to offset those values by 0.5 texels.  Anyone
> else seen this?

> Brian




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Gamedevlists-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=557