godot/thirdparty/freetype/src/pshinter/pshalgo.h

/****************************************************************************
 *
 * pshalgo.h
 *
 *   PostScript hinting algorithm (specification).
 *
 * Copyright (C) 2001-2023 by
 * David Turner, Robert Wilhelm, and Werner Lemberg.
 *
 * This file is part of the FreeType project, and may only be used,
 * modified, and distributed under the terms of the FreeType project
 * license, LICENSE.TXT.  By continuing to use, modify, or distribute
 * this file you indicate that you have read the license and
 * understand and accept it fully.
 *
 */


#ifndef PSHALGO_H_
#define PSHALGO_H_


#include "pshrec.h"
#include "pshglob.h"


FT_BEGIN_HEADER


  /* handle to Hint structure */
  PSH_Hint;


  /* hint bit-flags */
#define PSH_HINT_GHOST
#define PSH_HINT_BOTTOM
#define PSH_HINT_ACTIVE
#define PSH_HINT_FITTED


#define psh_hint_is_active( x )
#define psh_hint_is_ghost( x )
#define psh_hint_is_fitted( x )

#define psh_hint_activate( x )
#define psh_hint_deactivate( x )
#define psh_hint_set_fitted( x )


  /* hint structure */
  PSH_HintRec;


  /* this is an interpolation zone used for strong points;  */
  /* weak points are interpolated according to their strong */
  /* neighbours                                             */
  PSH_Zone;


  PSH_Hint_Table;


  PSH_Point;
  PSH_Contour;

  PSH_Dir;


  /* the following bit-flags are computed once by the glyph */
  /* analyzer, for both dimensions                          */
#define PSH_POINT_OFF
#define PSH_POINT_SMOOTH
#define PSH_POINT_INFLEX


#define psh_point_is_smooth( p )
#define psh_point_is_off( p )
#define psh_point_is_inflex( p )

#define psh_point_set_smooth( p )
#define psh_point_set_off( p )
#define psh_point_set_inflex( p )


  /* the following bit-flags are re-computed for each dimension */
#define PSH_POINT_STRONG
#define PSH_POINT_FITTED
#define PSH_POINT_EXTREMUM
#define PSH_POINT_POSITIVE
#define PSH_POINT_NEGATIVE
#define PSH_POINT_EDGE_MIN
#define PSH_POINT_EDGE_MAX


#define psh_point_is_strong( p )
#define psh_point_is_fitted( p )
#define psh_point_is_extremum( p )
#define psh_point_is_positive( p )
#define psh_point_is_negative( p )
#define psh_point_is_edge_min( p )
#define psh_point_is_edge_max( p )

#define psh_point_set_strong( p )
#define psh_point_set_fitted( p )
#define psh_point_set_extremum( p )
#define psh_point_set_positive( p )
#define psh_point_set_negative( p )
#define psh_point_set_edge_min( p )
#define psh_point_set_edge_max( p )


  PSH_PointRec;


  PSH_ContourRec;


  PSH_Glyph;


#ifdef DEBUG_HINTER
  extern PSH_Hint_Table  ps_debug_hint_table;

  typedef void
  (*PSH_HintFunc)( PSH_Hint  hint,
                   FT_Bool   vertical );

  extern PSH_HintFunc    ps_debug_hint_func;

  extern PSH_Glyph       ps_debug_glyph;
#endif


  extern FT_Error
  ps_hints_apply( PS_Hints        ps_hints,
                  FT_Outline*     outline,
                  PSH_Globals     globals,
                  FT_Render_Mode  hint_mode );


FT_END_HEADER


#endif /* PSHALGO_H_ */


/* END */