freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] Why 26.6 ?


From: Peter Montgomery
Subject: Re: [Freetype] Why 26.6 ?
Date: Tue, 17 Sep 2002 16:09:42 -0700

Hi,

Folks, you're getting things all mixed up.  26.6 refers to the placement
of a pixel on a grid with fractional accuracy - in this case the
fraction is 2 ^ 64.  If the 26 refers to pixels (as opposed to inches,
centimeters, etc) , this simply means that you can position text to any
of 64 possible sub-pixel positions.

Levels of anti-aliasing has <nothing> to do with sub-pixel positioning.
You can position text to a fractional position and then render it as 1
bit per pixel monochrome.  This will effectively round off your
positioning to the nearest whole pixel, but you can still specify the
positioning as a fractional pixel.  If you render with 256 levels of
gray, then you have that many levels of anti-aliasing available <no
matter where you position it>!

Think about it.  Suppose that FreeType only allowed you to position text
in whole pixel increments, but you rendered the text with 256 levels of
anti-aliasing.  Does that mean that suddenly the text would become
monochrome?  Of course not.  The positioning accuracy and the
anti-aliasing are completely different aspects of graphics that are not
connected.  In creating a graphics rendering system you can

1 - Have 256 levels of anti-aliasing and no fractional positioning
2 - No anti-aliasing with fractional positioning
3  - Both
4 - Neither

The choice is up to you when you design the renderer.  Among other
choices, FreeType happens to allow fractional positioning with 256
levels of anti-aliasing.

The sole relationship between anti-aliasing and sub-pixel positioning is
that if you expect to see your fractional positioning, then you better
have some anti-aliasing going on.  FreeType uses 256 levels of grayscale
anti-aliasing which is as much as virtually all common display systems
on PCs allow.

    Thanks,
    PeterM


----- Original Message -----
From: "Boris Letocha" <address@hidden>
To: <address@hidden>
Sent: Tuesday, September 17, 2002 2:32 AM
Subject: RE: [Freetype] Why 26.6 ?



> 26.6 the .6 refers 2^6 = 64, isn't it??
Yes, but you have 64 in both axises. 64*64 is 4096 different subpixels.

Boris




reply via email to

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