1 /***************************************************************************/
5 /* FreeType size objects management (specification). */
7 /* Copyright 1996-2001 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
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. */
16 /***************************************************************************/
19 /*************************************************************************/
21 /* Typical application would normally not need to use these functions. */
22 /* However, they have been placed in a public API for the rare cases */
23 /* where they are needed. */
25 /*************************************************************************/
33 #include FT_FREETYPE_H
39 /*************************************************************************/
42 /* sizes_management */
48 /* Managing multiple sizes per face */
51 /* When creating a new face object (e.g. with @FT_New_Face), an */
52 /* @FT_Size object is automatically created and used to store all */
53 /* pixel-size dependent information, available in the "face->size" */
56 /* It is however possible to create more sizes for a given face, */
57 /* mostly in order to manage several character pixel sizes of the */
58 /* same font family and style. See @FT_New_Size and @FT_Done_Size. */
60 /* Note that @FT_Set_Pixel_Sizes and @FT_Set_Character_Size only */
61 /* modify the contents of the current "active" size; you thus need */
62 /* to use @FT_Activate_Size to change it. */
64 /* 99% of applications won't need the functions provided here, */
65 /* especially if they use the caching sub-system, so be cautious */
66 /* when using these. */
68 /*************************************************************************/
71 /*************************************************************************/
77 /* Creates a new size object from a given face object. */
80 /* face :: A handle to a parent face object. */
83 /* asize :: A handle to a new size object. */
86 /* FreeType error code. 0 means success. */
89 /* You need to call @FT_Activate_Size in order to select the new size */
90 /* for upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size, */
91 /* @FT_Load_Glyph, @FT_Load_Char, etc. */
94 FT_New_Size( FT_Face face,
98 /*************************************************************************/
104 /* Discards a given size object. */
107 /* size :: A handle to a target size object. */
110 /* FreeType error code. 0 means success. */
112 FT_EXPORT( FT_Error )
113 FT_Done_Size( FT_Size size );
116 /*************************************************************************/
119 /* FT_Activate_Size */
122 /* Even though it is possible to create several size objects for a */
123 /* given face (see @FT_New_Size for details), functions like */
124 /* @FT_Load_Glyph or @FT_Load_Char only use the last-created one to */
125 /* determine the "current character pixel size". */
127 /* This function can be used to "activate" a previously created size */
131 /* size :: A handle to a target size object. */
134 /* FreeType error code. 0 means success. */
137 /* If "face" is the size's parent face object, this function changes */
138 /* the value of "face->size" to the input size handle. */
140 FT_EXPORT( FT_Error )
141 FT_Activate_Size( FT_Size size );
148 #endif /* __FTSIZES_H__ */