freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Stem darkening toggling API


From: Werner LEMBERG
Subject: Re: [ft-devel] Stem darkening toggling API
Date: Thu, 27 Oct 2016 09:19:56 +0200 (CEST)

> Found the time to do a new revision :)
> 
> It comes with FT_Face_Option(...) and puts the stem darkening flag
> into the internal structure of FT_Face.

This looks very nice – and very clean, thanks!

Just to sum up what we currently have to control stem darkening (for
CFF).  The same essentially holds for all other parameters that
control FreeType modules.

  1. A configure-time option (more or less).

       CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}[1-4]

  2. A run-time option to globally control stem darkening for all
     faces.

       FT_Property_Set( library, "cff",
                        "no-stem-darkening", &no_stem_darkening );

  3. An environment option to globally control stem darkening for all
     faces.

       FREETYPE_PROPERTIES=cff:no-stem-darkening=1

     [Note that Chromium – and possibly other browsers also – disable
      environment handling for FreeType in most situations, making it
      impossible to select v35 TrueType hinting, for example, if v40
      is the default.  I consider this an annoying limitation, and I
      hope that the Chromium people fix this soon.]

  4. Your proposed interface to control stem darkening for a specific
     face.

       FT_Face_Option( FT_Face       face,
                       FT_UInt       num_params,
                       FT_Parameter* parameters );

To me, this hierarchy looks fine – and we don't have to remove
functionality IMHO since every level makes sense.


    Werner

reply via email to

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