2006-01-22 07:58:16 +01:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* afwarp.h */
|
|
|
|
/* */
|
|
|
|
/* Auto-fitter warping algorithm (specification). */
|
|
|
|
/* */
|
2007-01-25 12:50:00 +01:00
|
|
|
/* Copyright 2006, 2007 by */
|
2006-01-22 07:58:16 +01:00
|
|
|
/* 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. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
|
|
|
|
2006-01-21 15:31:45 +01:00
|
|
|
#ifndef __AFWARP_H__
|
|
|
|
#define __AFWARP_H__
|
|
|
|
|
|
|
|
#include "afhints.h"
|
|
|
|
|
|
|
|
FT_BEGIN_HEADER
|
|
|
|
|
2006-01-22 07:58:16 +01:00
|
|
|
#define AF_WARPER_SCALE
|
|
|
|
|
|
|
|
#define AF_WARPER_FLOOR( x ) ( (x) & ~63 )
|
|
|
|
#define AF_WARPER_CEIL( x ) AF_WARPER_FLOOR( (x) + 63 )
|
|
|
|
|
2006-01-21 15:31:45 +01:00
|
|
|
|
2006-01-22 07:58:16 +01:00
|
|
|
typedef FT_Int32 AF_WarpScore;
|
2006-01-21 15:31:45 +01:00
|
|
|
|
2006-01-22 07:58:16 +01:00
|
|
|
typedef struct AF_WarperRec_
|
|
|
|
{
|
|
|
|
FT_Pos x1, x2;
|
|
|
|
FT_Pos t1, t2;
|
|
|
|
FT_Pos x1min, x1max;
|
|
|
|
FT_Pos x2min, x2max;
|
|
|
|
FT_Pos w0, wmin, wmax;
|
2006-01-21 15:31:45 +01:00
|
|
|
|
2006-01-22 07:58:16 +01:00
|
|
|
FT_Fixed best_scale;
|
|
|
|
FT_Pos best_delta;
|
|
|
|
AF_WarpScore best_score;
|
|
|
|
AF_WarpScore best_distort;
|
2006-01-21 15:31:45 +01:00
|
|
|
|
2006-01-22 07:58:16 +01:00
|
|
|
} AF_WarperRec, *AF_Warper;
|
2006-01-21 15:31:45 +01:00
|
|
|
|
|
|
|
|
2006-01-22 07:58:16 +01:00
|
|
|
FT_LOCAL( void )
|
|
|
|
af_warper_compute( AF_Warper warper,
|
|
|
|
AF_GlyphHints hints,
|
|
|
|
AF_Dimension dim,
|
|
|
|
FT_Fixed *a_scale,
|
|
|
|
FT_Fixed *a_delta );
|
|
|
|
|
2006-01-21 15:31:45 +01:00
|
|
|
|
|
|
|
FT_END_HEADER
|
|
|
|
|
2006-01-22 07:58:16 +01:00
|
|
|
|
2006-01-21 15:31:45 +01:00
|
|
|
#endif /* __AFWARP_H__ */
|
2006-01-22 07:58:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
/* END */
|