ftsynth.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /***************************************************************************/
  2. /* */
  3. /* ftsynth.h */
  4. /* */
  5. /* FreeType synthesizing code for emboldening and slanting */
  6. /* (specification). */
  7. /* */
  8. /* Copyright 2000-2001, 2003, 2006, 2008, 2012, 2013 by */
  9. /* David Turner, Robert Wilhelm, and Werner Lemberg. */
  10. /* */
  11. /* This file is part of the FreeType project, and may only be used, */
  12. /* modified, and distributed under the terms of the FreeType project */
  13. /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
  14. /* this file you indicate that you have read the license and */
  15. /* understand and accept it fully. */
  16. /* */
  17. /***************************************************************************/
  18. /*************************************************************************/
  19. /*************************************************************************/
  20. /*************************************************************************/
  21. /*************************************************************************/
  22. /*************************************************************************/
  23. /********* *********/
  24. /********* WARNING, THIS IS ALPHA CODE! THIS API *********/
  25. /********* IS DUE TO CHANGE UNTIL STRICTLY NOTIFIED BY THE *********/
  26. /********* FREETYPE DEVELOPMENT TEAM *********/
  27. /********* *********/
  28. /*************************************************************************/
  29. /*************************************************************************/
  30. /*************************************************************************/
  31. /*************************************************************************/
  32. /*************************************************************************/
  33. /* Main reason for not lifting the functions in this module to a */
  34. /* `standard' API is that the used parameters for emboldening and */
  35. /* slanting are not configurable. Consider the functions as a */
  36. /* code resource that should be copied into the application and */
  37. /* adapted to the particular needs. */
  38. #ifndef __FTSYNTH_H__
  39. #define __FTSYNTH_H__
  40. #include <ft2build.h>
  41. #include FT_FREETYPE_H
  42. #ifdef FREETYPE_H
  43. #error "freetype.h of FreeType 1 has been loaded!"
  44. #error "Please fix the directory search order for header files"
  45. #error "so that freetype.h of FreeType 2 is found first."
  46. #endif
  47. FT_BEGIN_HEADER
  48. /* Embolden a glyph by a `reasonable' value (which is highly a matter of */
  49. /* taste). This function is actually a convenience function, providing */
  50. /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */
  51. /* */
  52. /* For emboldened outlines the height, width, and advance metrics are */
  53. /* increased by the strength of the emboldening. You can also call */
  54. /* @FT_Outline_Get_CBox to get precise values. */
  55. FT_EXPORT( void )
  56. FT_GlyphSlot_Embolden( FT_GlyphSlot slot );
  57. /* Slant an outline glyph to the right by about 12 degrees. */
  58. FT_EXPORT( void )
  59. FT_GlyphSlot_Oblique( FT_GlyphSlot slot );
  60. /* */
  61. FT_END_HEADER
  62. #endif /* __FTSYNTH_H__ */
  63. /* END */