summaryrefslogtreecommitdiff
path: root/include/freetype/ftautoh.h
blob: d4356212f9578503a18357c757a4d7fc27cb2f14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
/***************************************************************************/
/*                                                                         */
/*  ftautoh.h                                                              */
/*                                                                         */
/*    FreeType API for setting and accessing auto-hinter properties        */
/*    (specification).                                                     */
/*                                                                         */
/*  Copyright 2012 by                                                      */
/*  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.                                        */
/*                                                                         */
/***************************************************************************/


#ifndef __FTAUTOH_H__
#define __FTAUTOH_H__

#include <ft2build.h>
#include FT_FREETYPE_H

#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
#error "Please fix the directory search order for header files"
#error "so that freetype.h of FreeType 2 is found first."
#endif


FT_BEGIN_HEADER


  /*************************************************************************/
  /*                                                                       */
  /* <Section>                                                             */
  /*    autohinter                                                         */
  /*                                                                       */
  /* <Title>                                                               */
  /*    The Auto-hinter                                                    */
  /*                                                                       */
  /* <Abstract>                                                            */
  /*    Controlling the behaviour of the auto-hinting engine.              */
  /*                                                                       */
  /* <Description>                                                         */
  /*    This section contains the declaration of functions specific to the */
  /*    auto-hinter.                                                       */
  /*                                                                       */
  /*************************************************************************/


  /**********************************************************************
   *
   * @enum:
   *    FT_AUTOHINTER_XXX
   *
   * @description:
   *    A list of bit-field constants used with
   *    @FT_Library_GetAutohinterProperties,
   *    @FT_Face_GetAutohinterProperties,
   *    @FT_Library_SetAutohinterProperties, and
   *    @FT_Face_SetAutohinterProperties to control the behaviour of the
   *    auto-hinter.
   *
   * @values:
   *    FT_AUTOHINTER_DEFAULT::
   *      Corresponding to~0, this value indicates the default value.
   *
   *    FT_AUTOHINTER_INCREASE_GLYPH_HEIGHTS ::
   *      For glyphs in the size range 5 < PPEM < 15, round up the glyph
   *      height much more often than normally.
   */
#define FT_AUTOHINTER_DEFAULT                 0x0
#define FT_AUTOHINTER_INCREASE_GLYPH_HEIGHTS  ( 1L << 0 )


 /**********************************************************************
  *
  * @function:
  *    FT_Library_GetAutohinterProperties
  *
  * @description:
  *    Retrieve the global property flags which control the behaviour of the
  *    auto-hinter.
  *
  * @output:
  *    properties ::
  *       The current global auto-hinter property flags, consisting of
  *       @FT_AUTOHINTER_XXX constants which are ORed together.
  *
  *       Use @FT_Face_GetAutohinterProperties to retrieve the local
  *       properties of a face.
  *
  * @return:
  *   FreeType error code.  0~means success.
  */
  FT_EXPORT( FT_Error )
  FT_Library_GetAutohinterProperties( FT_Library  library,
                                      FT_Int32   *properties );


 /**********************************************************************
  *
  * @function:
  *    FT_Library_SetAutohinterProperties
  *
  * @description:
  *    Set the global property flags which control the behaviour of the
  *    auto-hinter.
  *
  * @input:
  *    properties ::
  *       The auto-hinter property flags to be set globally, consisting of
  *       @FT_AUTOHINTER_XXX constants which are ORed together.  All faces
  *       created after a call to this function inherit the new auto-hinter
  *       properties.
  *
  *       Use @FT_Face_SetAutohinterProperties to override the properties
  *       locally.
  *
  * @return:
  *   FreeType error code.  0~means success.
  */
  FT_EXPORT( FT_Error )
  FT_Library_SetAutohinterProperties( FT_Library  library,
                                      FT_Int32    properties );


 /**********************************************************************
  *
  * @function:
  *    FT_Face_GetAutohinterProperties
  *
  * @description:
  *    Retrieve the property flags which control the behaviour of the
  *    auto-hinter for the given face.
  *
  * @input:
  *    face ::
  *       A handle to the input face.
  *
  * @output:
  *    properties ::
  *       The current auto-hinter property flags of the given face,
  *       consisting of @FT_AUTOHINTER_XXX constants which are ORed
  *       together.
  *
  * @return:
  *   FreeType error code.  0~means success.
  *
  */
  FT_EXPORT( FT_Error )
  FT_Face_GetAutohinterProperties( FT_Face    face,
                                   FT_Int32  *properties );


 /**********************************************************************
  *
  * @function:
  *    FT_Face_SetAutohinterProperties
  *
  * @description:
  *    Set the property flags which control the behaviour of the autolhinter
  *    for the given face.
  *
  * @input:
  *    face ::
  *       A handle to the input face.
  *
  *    properties ::
  *       The auto-hinter property flags to be set for the given face,
  *       consisting of @FT_AUTOHINTER_XXX constants which are ORed
  *       together.
  *
  *       By default, a face inherits the global auto-hinter properties (set
  *       with @FT_Library_SetAutohinterProperties, if any) at the time of
  *       its creation.  Using this function you can override them locally.
  *
  * @return:
  *   FreeType error code.  0~means success.
  */
  FT_EXPORT( FT_Error )
  FT_Face_SetAutohinterProperties( FT_Face   face,
                                   FT_Int32  properties );

 /* */

FT_END_HEADER

#endif /* __FTAUTOH_H__ */


/* END */