freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] Re: FTGL fuzzy bitmap font


From: Roberto Peon
Subject: Re: [Freetype] Re: FTGL fuzzy bitmap font
Date: Thu, 3 Oct 2002 21:09:59 -0700
User-agent: KMail/1.4.1

Ryan-

We have a custom library similar to FTGL, and don't experience any "fuzzyness" 
from freetype itself, but we've only been using true-type fonts.

However, there are several reasons that you could be rendering fuzzy textures 
from GL.. Depending on the type of interpolation function you have selected 
(GL_LINEAR, or GL_NEAREST being the two most common), you can draw the 
texture such that each pixel of the texture can lie across up to 4 pixels 
(assuming you're drawing in an ortho projection and the projection is unitary 
wrt. pixel size (i.e. glBegin(GL_LINES); glVertex2i(0,0); glVertex2i(9,0); 
glEnd(); draws a line from (0,0) in the raster image to (9,0) in the raster 
image)).

If you use GL_NEAREST, then each pixel of the raster image will use exactly 1 
pixel from the texture. This ensures that the text displays with the best 
"sharpness", however it prevents you from drawing text in sub-pixel offsets.

When we need to move text by sub-pixel increments, we use GL_LINEAR for 
interpolation, and when the text lies between certain values it looks blurry 
unless we increase the resolution of the texture, then do our own blur upon 
it. (Why? This changes how GL samples the texture, and gives us more control 
over what texture pixel is mapped to the raster pixel)

hope this helped!
-Roberto JP
address@hidden


On Thursday 03 October 2002 05:35 pm, address@hidden wrote:
> Greetings,
>
> I am attempting to use the FTGL wrapper to freetype2.
> Overall I am quite happy with performance, however,
> bitmapped fonts are not being rendered properly. (The
> other four modes are being rendered properly)  The
> majority of the characters appear "fuzzy" and
> unrecognizable.  I am experiencing this behaviour in
> the two FTGL demos as well as my own app, which makes
> me wonder if I have compiled freetype properly?
>
> Has anyone encountered similiar problems?  Any help
> would be greatly appreciated.
>
> Regards,
> Ryan
>
> __________________________________________________________
> Get your FREE personalized e-mail at http://www.canada.com
>
> _______________________________________________
> Freetype mailing list
> address@hidden
> http://www.freetype.org/mailman/listinfo/freetype




reply via email to

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