freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Disabling the autohinter


From: David Turner
Subject: Re: [Devel] Disabling the autohinter
Date: Sat, 22 Jun 2002 12:19:55 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530

Detlef Würkner wrote:
address@hidden (Keith Packard) wrote:


That's not quite what I want; I'd like to have no hinting when a format-specific hinter is not available. When anti-aliasing most fonts, the autohinter generally produces worse looking output than the unhinted glyphs.


So you want the autohinter to be never used? Then you dont need to link
it. Comment out the line

FT_USE_MODULE(autohint_module_class)

Yes, but this requires a custom build of the library, not a very good
idea, since Keith wants to use FreeType as available on a given system.

in config/ftmodule.h and rebuild (here this works as expected).
In source code the only possibility I'm aware of is (untested)

if ( !FT_DRIVER_HAS_HINTER( face->driver ) )
  flags |= FT_LOAD_NO_HINTING;


FT_DRIVER_HAS_HINTER is an internal macro and should never be
used by client applications, so this is not a very good thing
to do either. The only orking solutions I'm thinking of are:

  - unload the "autohinter" module when initializing the
    library, something like:

        FT_Library  library;
        FT_Module   autohint;

        error = FT_Init_FreeType( &library );
        if ( error ) { .... }

        autohint = FT_Get_Module( library, "autohinter" );
        if ( autohing != NULL )
        {
          FT_Remove_Module( library, module );
        }

     Note that this is a global decision


   - lobby for the addition of a new function like
     FT_Set_AutoHint_Mode( library, mode ), where "mode"
     could take values like:

          FT_AUTOHINT_MODE_DEFAULT ::
              use the auto-hinter only when no format-specific
              hinter is available

          FT_AUTOHINT_MODE_NEVER ::
              never use the auto-hinter

     Again, a global decision


   - lobby for the addition of a new FT_LOAD_NO_AUTOHINT bit flag
     to be used with FT_Load_Glyph/FT_Load_Char. However, I'm strongly
     against this kind of addition since we're running out of bit flags
     unless we want to drop portability to 16-bit systems; I thus
     prefer other solutions.

     In this specific case, the decision is local and can be changed
     each time a glyph is loaded. But my opinion is that if you know
     precisely when to disable/enable it, you can directly use the
     "FT_LOAD_NO_HINTING" bit-flag anyway..


Keith, what would be reasonable for you ??

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





reply via email to

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