Re: [ft] Font rasterization

2010-05-11 Thread Werner LEMBERG

 I have recently come across a great article about font rendering,
 http://www.antigrain.com/research/font_rasterization/

Thanks for the pointer, I haven't known this article.

 It basically states (and very convincingly illustrates) that the
 secret to very good font rendering is to use only vertical pixel
 alignment, [...]
 
 So, let me reiterate my main inquiry: is it possible (with freetype)
 to use vertical hinting and pixel alignment only, leaving subpixel
 rendering to take care of the horizontal aspect?

The `light' autohinting mode disables horizontal hinting (and in case
of italic fonts).

For native TrueType hinting, a volunteer is working on it right now,
implementing better ClearType support.  This will probably part of the
next FreeType version (to appear still in May) as an experimental
feature.

For PS fonts, the situation is unsatisfying currently since there are
some bugs lurking around which noone has time to take care of.  Here,
you can't disable horizontal hinting.  It has been suggested to use
the autohinter for PS hinting also, but again, noone has time to
implement it.


Werner

___
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype


Re: [ft] Font rasterization

2010-05-11 Thread Tor Andersson
Victor,

On 5/11/10, Victor loonyphoe...@gmail.com wrote:
 Hello!

 I apologize in advance if this is not the place to ask this question, but
 freetype doesn't seem to have a forum anywhere, so...

 I have recently come across a great article about font rendering,
 http://www.antigrain.com/research/font_rasterization/

 It basically states (and very convincingly illustrates) that the secret to
 very good font rendering is to use only vertical pixel alignment, which I
 take means to apply hinting only vertically. Horizontally, the article
 suggests to use subpixel rendering -- that would mean very good scalability
 and shapes. I have tried many configurations in an attempt to produce the
 same result (
 http://www.antigrain.com/research/font_rasterization/text_ft_antigrain.pngis
 a handcrafted example of what that would achieve), but horizontal
 pixel
 alignment seems to kick in even when disabling hinting completely. This is
 evidenced by characters having the same width with diffrent sizes. For
 example, if you scale the line l, its length
 will increase unevenly: at first it would change very little and then
 suddenly make a great leap. Either that, or that line would seem to have
 unevenly distributed spaces between the characters.

 I'm wondering if I just can't figure out how to configure it all correctly,
 or if the pixel alignment is built in without the ability to turn it off
 somehow. Or if maybe it's the creators of web browsers, office suites or
 desktops environments don't know how to achieve such an effect.

 So, let me reiterate my main inquiry: is it possible (with freetype) to use
 vertical hinting and pixel alignment only, leaving subpixel rendering to
 take care of the horizontal aspect?

With regard to pixel alignment, it is certainly possible to render
glyphs with a fractional offset with Freetype. This is set with
the vector argument to FT_Set_Transform(). Sadly most UI
toolkits and all web browsers that I have seen make the assumption
that all fonts will be hinted horizontally and as such only calculate
the glyph metrics and positioning using integers.

-Tor

___
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype