freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] FT_LOAD_NO_HINTING and "ft_render_mode_normal"


From: David Turner
Subject: Re: [Freetype] FT_LOAD_NO_HINTING and "ft_render_mode_normal"
Date: Thu, 19 Dec 2002 00:20:32 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130

Hello Jeff,

Jeff Chow wrote:

Hi Everyone,

I was just wondering what effects the FT_LOAD_NO_HINTING flag has on glyphs
that are rasterized using the ft_render_mode_normal flag as opposed to the
ft_render_mode_mono flag:
- hinting is required to get acceptable (even if low quality) monochrome rendering,
 otherwise you'll get crap, as you've yourself experimented.

- you can disable it when rendering anti-aliased glyphs, but the results will vary
 greatly with the AA scan-line converter you'll use:

* FreeType 1 and Windows will not produce very good un-hinted glyph images,
      because they use too few levels of opacity

* FreeType 2 generates very quickly images containing up to 256 levels of opacity, which is sufficient to generate high-quality images that perfectly match the original glyph outlines at all sizes.. However, many people find these images "blurry" as well

* As far as I know, MacOS X generates un-hinted AA glyph images, but uses a special filtering scanline-converter to get rid of the "blurriness". Their implementation is also known to be a *real* performance hog, though this
      might also come from other factors (caching for example)

hinting is thus also a good way to get rid of the "bluriness" of AA glyph images, because it's capable of slightly distorting the scaled glyph outlines in order to align them to the pixel
grid (thus increasing contrast and reducing blur/gray).

however, hinting is a really non-trivial process, and FT2 implements three different ones:

- TrueType hinting (disabled by default), whose results are mandated by the content of the font. In other words, if the font hints suck, you'd better disable hinting

 - Postscript hinting, whose results are currently the best with FT2

- Automatic hinting, used when there are no hints in the font, or when you cannot use them for stupid patent reasons (this means TrueType and PFR, since BitStream
    owns a patent on hinting of fonts in this format).

the result of hinted AA glyphs depends on the quality of the glyphs, when available, as well as the "intelligence" put in the hinter(s). I have tuned FT2's algorithms quite extensively to ensure optimal rendering in most cases, however, there are still some difficult cases that the current implementation do not deal with too well. Note that this won't be fixed in the future, but I really can't provide any deadline for this :-)

if you're not satisfied with the quality of hinted AA glyphs, you can:

- try to see if there isn't a different font that render betters with FT2
  (currently Postscript and OpenType/CFF will render better than
   TrueTypes)

- try to disable hinting and see if the results satisfy you.


Hope this helps,

- David Turner
- The FreeType Project  (www.freetype.org)





reply via email to

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