freetype
[Top][All Lists]
Advanced

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

Re: [ft] Modifying/Enhancing the Truetype Interpreter


From: Werner LEMBERG
Subject: Re: [ft] Modifying/Enhancing the Truetype Interpreter
Date: Tue, 22 Dec 2009 07:35:06 +0100 (CET)

>> And finally, do you have a working ClearType emulation, this is, at
>> least tripling the horizontal resolution for calling the bytecode
>> interpreter, then compressing the results again for proper subpixel
>> positioning?
>
> No, I do not.  I have tinkered with the code a bit, but haven't
> really had a chance to sit down and seriously try something.

Modifying, say, ftview shouldn't be too hard.  I would be glad to
incorporate your yet-to-come changes into the git repository, BTW :-)

> I was thinking though – is it even necessary to have a resolution to
> snap to in the X direction?

Currently, FreeType's smooth renderer in the (horizontal) LCD modes
hints the fonts at (R,R) resolution, renders at (3R,R), then
compresses the horizontal data using a color filter to get (R,R)
again.  The important step to emulate ClearType – and to see problems
with fonts – is to hint at (3R,R) too.  If I interpret the ClearType
paper correctly, Microsoft uses (16R,R) to get even finer control.  I
can even imagine that some fonts render badly if you don't use (16R,R)
too.

Note that FreeType's TrueType interpreter in versions prior to 2.3.10
was buggy if the horizontal and vertical resolutions differed.

> In this scenario perhaps grid-fitting to 1/3 pixel in the X
> direction would be considered "full hinting" and leaving the X
> direction alone entirely would be considered "slight hinting"?

The latter is what you currently get with FreeType in the LCD modes.
A direct comparison would be very interesting and instructive – one
more reason that I ask you to extend ftview (or, perhaps even better,
ftdiff).


    Werner

reply via email to

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