2018-06-03 09:01:17 +02:00
|
|
|
/****************************************************************************
|
|
|
|
*
|
|
|
|
* afwarp.h
|
|
|
|
*
|
|
|
|
* Auto-fitter warping algorithm (specification).
|
|
|
|
*
|
2020-01-19 17:05:19 +01:00
|
|
|
* Copyright (C) 2006-2020 by
|
2018-06-03 09:01:17 +02: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-22 07:58:16 +01:00
|
|
|
|
|
|
|
|
2016-01-12 21:37:13 +01:00
|
|
|
#ifndef AFWARP_H_
|
|
|
|
#define AFWARP_H_
|
2006-01-21 15:31:45 +01:00
|
|
|
|
|
|
|
#include "afhints.h"
|
|
|
|
|
|
|
|
FT_BEGIN_HEADER
|
|
|
|
|
2006-01-22 07:58:16 +01:00
|
|
|
#define AF_WARPER_SCALE
|
|
|
|
|
2015-06-23 09:24:48 +02:00
|
|
|
#define AF_WARPER_FLOOR( x ) ( (x) & ~FT_TYPEOF( x )63 )
|
2006-01-22 07:58:16 +01:00
|
|
|
#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
|
|
|
|
|
|
|
|
2018-06-02 09:53:58 +02:00
|
|
|
#ifdef AF_CONFIG_OPTION_USE_WARPER
|
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,
|
2019-02-16 07:05:39 +01:00
|
|
|
FT_Pos *a_delta );
|
2018-06-02 09:53:58 +02:00
|
|
|
#endif
|
2006-01-22 07:58:16 +01:00
|
|
|
|
2006-01-21 15:31:45 +01:00
|
|
|
|
|
|
|
FT_END_HEADER
|
|
|
|
|
2006-01-22 07:58:16 +01:00
|
|
|
|
2016-01-12 21:37:13 +01:00
|
|
|
#endif /* AFWARP_H_ */
|
2006-01-22 07:58:16 +01:00
|
|
|
|
|
|
|
|
|
|
|
/* END */
|