freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Experimental grayscale native TrueType hinting support


From: Rogier van Dalen
Subject: Re: [Devel] Experimental grayscale native TrueType hinting support
Date: Thu, 10 Apr 2003 16:25:20 +0200

>    Here's a small patch against the current FreeType 2 sources that
"activates"
>    gray-scale specific hinting within the TrueType bytecode interpreter.
That's great. FYI, I'll summarise what I found some months ago while trying
to understand how ClearType and instructions interact (note that this was
done looking at the Verdana font that comes with Windows XP). I have not
been able to find *any* documentation about this. Pretending the rasteriser
does ClearType may be interesting for fonts like Verdana, which otherwise
will be instructed for non-anti-aliased rendering.

First of all, italic glyphs seem to be rounded to the subpixel grid, while
regular glyphs aren't (or this is done by looking at the italiceAngle field
in the 'post' table?). This seems pretty expensive to me, because either
three 'e's have to be cached, or the filtering must be applied when drawing
the glyph on the screen. For italic fonts, multiplying the x-resolution by 3
gives a perfect reproduction of the ClearType rasteriser's result.

>      - the GETINFO bytecode now returns a scaler value (35) corresponding
to
>        the Microsoft Scaler v. 1.7, according to the information found in
the
>        OpenType spec

Actually, Verdana tests for versions 36 and for anything higher as well. For
version 37 and higher, GETINFO is called with 0x80, 0x100 and 0x200 as well,
for which 0x4000, 0x8000 and 0x10000 may be returned. I presume this is the
ClearType rasteriser, and it is queried for some ClearType values, but I am
not too sure. Some glyphs move slightly inx-direction at certain sizes when
these values are returned by GETINFO, but according to my tests they are not
aligned to 3-pixel boundaries or anything.

I have not found any evidence of delta instructions being skipped when the
instructions detect a ClearType rasteriser, so may deltap at the end of
glyph programs is just ignored by the rasteriser. This may be something the
FT interpreter should do when anti-aliasing???

Hope this is of any help,

Rogier






reply via email to

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