How does the following text look???

Figure 1.1: Non-anti-aliased Text sample
And How about this:

Figure 1.2: Anti-aliased Text sample
Isn’t the second text sample more pleasing to our eyes? Or do you think the first sample is sharperJ or the second too blurred? The power of perception! Let’s keep these things in mind before you proceed further. You might have to draw your conclusions based on these factors after understanding what anti-aliasing is.
Anti-aliasing text is the process of smoothening of edges such that text appears less jagged. Anti-aliasing text is a very important technique since too much of it might make text fuzzy and blurred and too little of it might make it appear jagged. Thus, the user needs to understand this and use the proper method based on the font used, font size used and application of it.
In Director MX 2004, we had options to either choose grayscale anti-aliasing or none. In case of Grayscale anti-aliasing we could also set the font size greater than which text had to be anti-aliased. When we choose none, we do not anti-alias at all.

Figure 1.3: Anti-aliasing in MX 2004.
But what if we want to project our movie using a LCD projector? How will grayscale anti-aliased text look when projected using a LCD projector?
To address a larger group of people, more options are introduced for anti-aliasing text in Director 11.
The different options by which we can anti-alias text in Director 11 are:
- AutoAlias
- GrayscaleAntiAlias
- SubpixelAntiAlias
The user still has the option of choosing “None” and this remove any kind of anti-aliasing that was present.
The following are the options and their corresponding symbols in Director 11 using which we can set the anti-aliasing through scripting:
Auto |
#AutoAlias |
Grayscale All |
#GrayScaleAllAlias |
Grayscale Larger Than |
#GrayscaleLargerThanAlias |
Subpixel All |
#SubpixelAllAlias |
None |
#NoneAlias |
Table 1.1: Symbols used in Director 11
The text is anti-aliased based on the font information, when this option is selected. A font might have a table known as the GASP. GASP stands for Grid fitting and Scan Conversion Procedure and this tells the system what method it should adopt for different font ranges, to anti-alias the text. A sample GASP table is shown below:

Figure 1.4: Sample GASP table from “Arial” font
These ranges are not fixed; they are based on the font developer and might vary from font to font. The method adopted in each range is also chosen by the font developer when he creates the font. The above GASP table is only an example.
The GASP table is not a mandatory table and thus it is possible that some fonts do not have it in its font information. In such cases, we do not force anti-alias if this option is chosen.
“A more complicated approach is to use standard anti-aliasing techniques from computer graphics. This can be thought of as determining, for each pixel, how much of that pixel is occupied by the letter, and drawing that pixel with that degree of opacity. For example, when drawing a black letter on a white background, if a pixel ideally should be half filled (perhaps by a diagonal line from corner to corner) it would be drawn in 50% gray. Simple application of this procedure can lead to somewhat blurry glyphs: for example, if the letter includes a vertical line which should be one pixel wide but falls exactly between two pixels, it will appear on screen a two-pixel-wide gray line.”
- “Font Rasterization”, Wikipedi.com
Grayscale anti-aliasing smoothes the characters by introducing grey pixels in the proper position such that it appears less jagged to the human eye. As seen in the image below, grey pixels of different intensities are added depending on its position and the weight of the adjacent pixel. The text at the bottom of the image is how it will appear and the text at the top is the zoomed to 800%.

Figure 1.5: Grayscale Anti-alias (zoomed to 800%)
We have one more option in Director 11 which is GrayscaleLargerThan. This option should be chosen when the user wants to perform grayscale anti-aliasing only on text which have font size greater than the specified threshold.
What is the reason for this option? Since we are filing in with grey pixels, it is possible that for text with smaller font sizes, text becomes blurred. Specifying the font size will avoid this problem.
Each pixel is made up of sub-pixels consisting of 3 components generally; they are the Red, Green and Blue (RGB). Sub-pixel anti-aliasing exploits these components at the sub-pixel level in order to achieve smoothness. If we notice in the image below, there are pixels which are filled with different colors unlike the grey pixels in our previous method mentioned above. This is mainly for projecting our content using a LCD projector.
The following image shows how a single pixel is made up in a LCD screen:

Figure 1.6: Sub-pixels making up a single pixel (courtesy: Wikipedia)

Figure 1.7: Sub-pixel Anti-alias (zoomed to 800%)
Thus when we use sub pixel anti-aliasing and render the text on the LCD screens, the blending will happen in such a manner that the screen pixels and the anti-aliased text combine to give us a very smooth look and the text is extremely soothing to our eyes.
Setting the Anti-Aliasing property through scripting:
The following snippet will enable you to set different type of anti-aliasing based on the input given by the user:
on mouseUp me
aaType = member("AntialiasType").text
case aaType of:
"Auto" : member("sampleText").antialiasType = #AutoAlias
"GrayscaleAll" :member("sampleText").antialiasType = #GrayscaleAllAlias
"GrayscaleLargerThan" : member("sampleText").antialiasType = #GrayscaleLargerThanAlias
member("sampleText").antiAliasThreshold = value(member("threshold").text)
"SubpixelAll" : member("sampleText").antialiasType = #SubpixelAllAlias
"None" : member("sampleText").antialiasType = #NoneAlias
end case
end
When we upgrade the text, the following mapping will be used in Director 11 in order to maintain the same look and feel as in the older version of Director.
Anti-Alias in MX 2004 |
Anti-Alias in Director 11 |
All Text |
Grayscale All |
Larger than |
Grayscale Larger Than |
None |
None |
Table 1.2: Mapping anti-aliasing from MX 2004 to Director 11
References:
- Grid fitting: http://www.tug.org/TUGboat/Articles/tb24-3/lemberg.pdf
- GASP: http://www.microsoft.com/typography/otspec/gasp.htm
- Grayscale Anti-aliasing: http://en.wikipedia.org/wiki/Font_rasterization
- Sub-pixel Anti-aliasing: http://en.wikipedia.org/wiki/Subpixel_rendering
Feedback:
If you have any questions or comments concerning this
article, please send a message to harini_raj1@yahoo.com |