/src/freetype/src/autofit/afwarp.h

https://bitbucket.org/cabalistic/ogredeps/ · C++ Header · 64 lines · 28 code · 19 blank · 17 comment · 0 complexity · 35ccc0b1a73ccd7e8550ba0cc0da1cc0 MD5 · raw file

  1. /***************************************************************************/
  2. /* */
  3. /* afwarp.h */
  4. /* */
  5. /* Auto-fitter warping algorithm (specification). */
  6. /* */
  7. /* Copyright 2006, 2007 by */
  8. /* David Turner, Robert Wilhelm, and Werner Lemberg. */
  9. /* */
  10. /* This file is part of the FreeType project, and may only be used, */
  11. /* modified, and distributed under the terms of the FreeType project */
  12. /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
  13. /* this file you indicate that you have read the license and */
  14. /* understand and accept it fully. */
  15. /* */
  16. /***************************************************************************/
  17. #ifndef __AFWARP_H__
  18. #define __AFWARP_H__
  19. #include "afhints.h"
  20. FT_BEGIN_HEADER
  21. #define AF_WARPER_SCALE
  22. #define AF_WARPER_FLOOR( x ) ( (x) & ~63 )
  23. #define AF_WARPER_CEIL( x ) AF_WARPER_FLOOR( (x) + 63 )
  24. typedef FT_Int32 AF_WarpScore;
  25. typedef struct AF_WarperRec_
  26. {
  27. FT_Pos x1, x2;
  28. FT_Pos t1, t2;
  29. FT_Pos x1min, x1max;
  30. FT_Pos x2min, x2max;
  31. FT_Pos w0, wmin, wmax;
  32. FT_Fixed best_scale;
  33. FT_Pos best_delta;
  34. AF_WarpScore best_score;
  35. AF_WarpScore best_distort;
  36. } AF_WarperRec, *AF_Warper;
  37. FT_LOCAL( void )
  38. af_warper_compute( AF_Warper warper,
  39. AF_GlyphHints hints,
  40. AF_Dimension dim,
  41. FT_Fixed *a_scale,
  42. FT_Fixed *a_delta );
  43. FT_END_HEADER
  44. #endif /* __AFWARP_H__ */
  45. /* END */