freetype-devel
[Top][All Lists]
Advanced

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

Re: anti-alias information


From: David Turner
Subject: Re: anti-alias information
Date: Fri, 07 Jul 2000 22:01:14 +0200

Hi Fang,

> 
> Dear David
> 
>         Would you tell me where to get all information about anti-alias,
> such as the anti-alias algorithm used in freetype, how to map the pixmap
> onto device? and so on. I am sorry if they already included in your
> doc of freetype 2.0 beta, but I just could not find them. Thank you very much.
>

The anti-aliasing algorithm is located in the scan-line converter that is found 
in "src/smooth/ftgrays.c". The algorithm used is optimised for
rendering small complex shapes at very high speed (it's faster than the
monochrome renderer for sizes < 20 pixels). I can't really detail it
in a few lines of e-mail. It is based on ideas gathered from the
"libart" library (see http://www.levien.com/libart) even though these
two implementations are _extremely_ different..

Basically, you should map an anti-aliased pixmap to the device yourself
(FreeType is _only_ a font library). This is usually done with any kind
of graphics library (you can also have a look at the "graph" directory
of the demonstration program, as it contains some code used to blit
gray pixmaps to various kinds of surfaces).

Alternatively, it is theorically possible to provide a callback to the
scan-line converter for "drawing" the gray spans in the target surface.
It's thus possible to perform direct compositing of glyph images on
pre-existing bitmaps but I've not documented this for now.

As already mentioned in a recent post to the devel list, there should
be a demonstration program to demonstrate how to do it soon..

Best Regards,

- David



reply via email to

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