freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] To Hint or Not To Hint


From: David Turner
Subject: Re: [Freetype] To Hint or Not To Hint
Date: Tue, 18 Feb 2003 16:44:23 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2a) Gecko/20020910

Hello ismail,

ismail (cartman) donmez wrote:
Hi all!

I am using freetype from cvs. It seems great with David Chester's patches so kudos to all freetype developers, but when I enable hinting fonts seem really distorted. Two screenshot to show the issue :

www.submoron.org/~cartman/alias.png shows when only anti-aliasing is on
www.submoron.org/~cartman/hinting.png shows when anti-aliasing + hinting is on.

As you can see when hinting is on fonts look real bad. Anyone got any idea what may be the problem ?

P.S : I am using TTF fonts from a Windows XP Professional installation.

Did you enable the TrueType bytecode interpreter, if yes, the current CVS
has a small bug that prevents correct TrueType hinting to work correctly
when the Chester hints are compiled. (For those that didn't notice it,
there are slight distorsions compared to the normal TrueType text).

If you want to correct this, you can *experimentally* replace the
following source, from line 569 in "src/truetype/ttobjs.c":

  #ifdef FT_CONFIG_CHESTER_ASCENDER

    /* Compute root ascender, descender, test height, and max_advance */
    metrics->ascender    = ( FT_MulFix( face->root.ascender,
                                        metrics->y_scale ) + 63 ) & -64;
    metrics->descender   = ( FT_MulFix( face->root.descender,
                                        metrics->y_scale ) + 0  ) & -64;
  #else /* !CHESTER_ASCENDER */
    /* Compute root ascender, descender, test height, and max_advance */
    metrics->ascender    = ( FT_MulFix( face->root.ascender,
                                        metrics->y_scale ) + 32 ) & -64;
    metrics->descender   = ( FT_MulFix( face->root.descender,
                                        metrics->y_scale ) + 32 ) & -64;
  #endif /* !CHESTER_ASCENDER */



by the following:

    /* Compute root ascender, descender, test height, and max_advance */
    metrics->ascender    = ( FT_MulFix( face->root.ascender,
                                        metrics->y_scale ) + 32 ) & -64;
    metrics->descender   = ( FT_MulFix( face->root.descender,
                                        metrics->y_scale ) + 32 ) & -64;

and please report the result. RC2 will contain a different fix with similar
results, though I won't explain the reasons here...

Another point, I suggest that you completely disable the bytecode interpreter,
you're probably going to be surprised by the resulting quality, especially at
the high dpi resolutions you seem to be using...

And to everyone, I'm sorry for not having the time currently to fix this
and a few other stupid bugs in the RC1, hope I'll be able to do that soon,
but who knows when this baby's coming out :-)

Hope this helps,

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




reply via email to

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