freetype-devel
[Top][All Lists]
Advanced

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

Re: FT2: ftraster questions


From: David Turner
Subject: Re: FT2: ftraster questions
Date: Fri, 07 Jan 2000 12:25:11 +0100

Hi Just,

> 
> My findings so far (note that I'm using FreeType2's ftraster.c as a
> standalone unit):
> 

> - ...but it seems to use levels of gray spread over a range from 0
>   (white) to 127 (black), where I expected 0..255.
>   (I set FT_Bitmap.num_grays to 256, if it matters.)
>
>   Do I need to do my own conversion, or is there another way?

Well, for now, the anti-alias algorithm is fixed to 128 levels of grays
(from 0 to 127). You can do your own conversion for now, or wait a bit
for an improved version. However, I must admit that I won't put a lot
of resources into this problem for now, as I'm pretty satisfied with
the current results, and still lots of work is needed in other areas..

Also, have a look at the source code in "demos/graph/grblit.c", it
contains routines to do this sort of conversion more or less
automatically. The new graphics sub-system is much more os-independent
than previously, and can be compiled with absolutely no display/window
support.

> - the antialiasing algorithm seems to do horizontal oversampling only (or
> mainly?). This looks *great* on vertical stems, but not so good on
> horizontal stems.
>
> I've put a showcase for my last two points at
>   http://www.petr.nl/just/ft2sample.gif
>
Well, it the horizontal anti-alias performed is a bit different
from the vertical one (look at the above picture with a magnifying
program, and you'll notice that differences in the levels of grays
used). I'll try to check the code, because theorically, the
difference should not be visible (probably a bug in there).
 
> Despite the comments: great stuff guys, thanks!
You're welcome :-)

Cheers, 

- David



reply via email to

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