ftparams.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. /***************************************************************************/
  2. /* */
  3. /* ftparams.h */
  4. /* */
  5. /* FreeType API for possible FT_Parameter tags (specification only). */
  6. /* */
  7. /* Copyright 2017-2018 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 FTPARAMS_H_
  18. #define FTPARAMS_H_
  19. #include <ft2build.h>
  20. #include FT_FREETYPE_H
  21. #ifdef FREETYPE_H
  22. #error "freetype.h of FreeType 1 has been loaded!"
  23. #error "Please fix the directory search order for header files"
  24. #error "so that freetype.h of FreeType 2 is found first."
  25. #endif
  26. FT_BEGIN_HEADER
  27. /**************************************************************************
  28. *
  29. * @section:
  30. * parameter_tags
  31. *
  32. * @title:
  33. * Parameter Tags
  34. *
  35. * @abstract:
  36. * Macros for driver property and font loading parameter tags.
  37. *
  38. * @description:
  39. * This section contains macros for the @FT_Parameter structure that are
  40. * used with various functions to activate some special functionality or
  41. * different behaviour of various components of FreeType.
  42. *
  43. */
  44. /***************************************************************************
  45. *
  46. * @constant:
  47. * FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
  48. *
  49. * @description:
  50. * A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
  51. * family names in the `name' table (introduced in OpenType version
  52. * 1.4). Use this for backward compatibility with legacy systems that
  53. * have a four-faces-per-family restriction.
  54. *
  55. * @since:
  56. * 2.8
  57. *
  58. */
  59. #define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY \
  60. FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
  61. /* this constant is deprecated */
  62. #define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \
  63. FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
  64. /***************************************************************************
  65. *
  66. * @constant:
  67. * FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
  68. *
  69. * @description:
  70. * A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
  71. * subfamily names in the `name' table (introduced in OpenType version
  72. * 1.4). Use this for backward compatibility with legacy systems that
  73. * have a four-faces-per-family restriction.
  74. *
  75. * @since:
  76. * 2.8
  77. *
  78. */
  79. #define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY \
  80. FT_MAKE_TAG( 'i', 'g', 'p', 's' )
  81. /* this constant is deprecated */
  82. #define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \
  83. FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
  84. /***************************************************************************
  85. *
  86. * @constant:
  87. * FT_PARAM_TAG_INCREMENTAL
  88. *
  89. * @description:
  90. * An @FT_Parameter tag to be used with @FT_Open_Face to indicate
  91. * incremental glyph loading.
  92. *
  93. */
  94. #define FT_PARAM_TAG_INCREMENTAL \
  95. FT_MAKE_TAG( 'i', 'n', 'c', 'r' )
  96. /**************************************************************************
  97. *
  98. * @constant:
  99. * FT_PARAM_TAG_LCD_FILTER_WEIGHTS
  100. *
  101. * @description:
  102. * An @FT_Parameter tag to be used with @FT_Face_Properties. The
  103. * corresponding argument specifies the five LCD filter weights for a
  104. * given face (if using @FT_LOAD_TARGET_LCD, for example), overriding
  105. * the global default values or the values set up with
  106. * @FT_Library_SetLcdFilterWeights.
  107. *
  108. * @since:
  109. * 2.8
  110. *
  111. */
  112. #define FT_PARAM_TAG_LCD_FILTER_WEIGHTS \
  113. FT_MAKE_TAG( 'l', 'c', 'd', 'f' )
  114. /**************************************************************************
  115. *
  116. * @constant:
  117. * FT_PARAM_TAG_RANDOM_SEED
  118. *
  119. * @description:
  120. * An @FT_Parameter tag to be used with @FT_Face_Properties. The
  121. * corresponding 32bit signed integer argument overrides the font
  122. * driver's random seed value with a face-specific one; see
  123. * @random-seed.
  124. *
  125. * @since:
  126. * 2.8
  127. *
  128. */
  129. #define FT_PARAM_TAG_RANDOM_SEED \
  130. FT_MAKE_TAG( 's', 'e', 'e', 'd' )
  131. /**************************************************************************
  132. *
  133. * @constant:
  134. * FT_PARAM_TAG_STEM_DARKENING
  135. *
  136. * @description:
  137. * An @FT_Parameter tag to be used with @FT_Face_Properties. The
  138. * corresponding Boolean argument specifies whether to apply stem
  139. * darkening, overriding the global default values or the values set up
  140. * with @FT_Property_Set (see @no-stem-darkening).
  141. *
  142. * This is a passive setting that only takes effect if the font driver
  143. * or autohinter honors it, which the CFF, Type~1, and CID drivers
  144. * always do, but the autohinter only in `light' hinting mode (as of
  145. * version 2.9).
  146. *
  147. * @since:
  148. * 2.8
  149. *
  150. */
  151. #define FT_PARAM_TAG_STEM_DARKENING \
  152. FT_MAKE_TAG( 'd', 'a', 'r', 'k' )
  153. /***************************************************************************
  154. *
  155. * @constant:
  156. * FT_PARAM_TAG_UNPATENTED_HINTING
  157. *
  158. * @description:
  159. * Deprecated, no effect.
  160. *
  161. * Previously: A constant used as the tag of an @FT_Parameter structure to
  162. * indicate that unpatented methods only should be used by the TrueType
  163. * bytecode interpreter for a typeface opened by @FT_Open_Face.
  164. *
  165. */
  166. #define FT_PARAM_TAG_UNPATENTED_HINTING \
  167. FT_MAKE_TAG( 'u', 'n', 'p', 'a' )
  168. /* */
  169. FT_END_HEADER
  170. #endif /* FTPARAMS_H_ */
  171. /* END */