[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freetype] Freetype fonts not drawn as well as Windows...
From: |
Giuliano Pochini |
Subject: |
Re: [Freetype] Freetype fonts not drawn as well as Windows... |
Date: |
Fri, 14 Sep 2001 18:52:28 +0200 (CEST) |
>> The anti-aliasing algorithm gets in input the closed paths and
>> draws each pixel in the dest bitmat according to the coverage. So,
>> regardless to which algorithm is used, the result should be the
>> same in all cases. Otherwise I think there's something wrong.
> I think you're over-simplifying things here. First of all, there
> are several ways to compute the "coverage", and each one of them
> will give you different results, and are only approximation of
> the "real" coverage.
Yes, I know about approximations...
> the current algorithm used by FreeType is the one with best
> precision I could find (for 256 levels of gray), and it is also
> very fast. The algorithm used in the previous beta was less
> accurate, faster, but generated unpleasant results for a
> certain number of glyphs (even if it could create better
> anti-aliased "w"), which is why it's been replaced..
That case should be addressed with proper hinting. I don't think
the renderer is to blame.
> Second, some algorithms will perform drop-out control, i.e.c
> create "virtual" pixels when certain delicate conditions are
> detected or met; it deals, among other things, with "vanishing"
> diagonals (which mathematically correspond to a coverage of 0 !!)
Oh, I didn't know this.
> And finally, filter theory will tell you that a perfect coverage
> isn't necessarily the best for text display anyway..
IMHO this is what the hinter is for. The AA algo should just draw
what upper layer's give it.
>> Oh, I still have that problem with very thin AA polygons... I want
>> to try to find tha cause, but I need some help. Where can I find
>> a doc that briefly explain how the AA algorithm works ?
>>
> I have tried to reproduce your results without success, I have
> extremely small lines working correctly here !?
>
> Could you send me the fixed-point coordinates of one of your
> lines, if possible a very small one but with noticeable artefact.
> I'll try to trace through the rasterizer to see what's happening
> when I'll get back in about 10 days..
Ok, the proggy is attached. To compile and run:
gcc -O2 -g -Wall -Wno-parentheses fttest.c -I/usr/local/include
-L/usr/local/lib -lfreetype -lpng -lm
./a.out > /other/sources/xxyyzz.png
It draws two sets of polygons, 0.1 and 0.5 pixels thin. They have
this shape:
__
\ \
\ \
\_\
You can see small artifacts in the 0.5 set too.
Bye.
fttest.c
Description: Binary data