1 /***************************************************************************/
5 /* FreeType size objects management (specification). */
7 /* Copyright 1996-2001, 2003, 2004, 2006, 2009 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
36 #error "freetype.h of FreeType 1 has been loaded!"
37 #error "Please fix the directory search order for header files"
38 #error "so that freetype.h of FreeType 2 is found first."
45 /*************************************************************************/
48 /* sizes_management */
54 /* Managing multiple sizes per face. */
57 /* When creating a new face object (e.g., with @FT_New_Face), an */
58 /* @FT_Size object is automatically created and used to store all */
59 /* pixel-size dependent information, available in the `face->size' */
62 /* It is however possible to create more sizes for a given face, */
63 /* mostly in order to manage several character pixel sizes of the */
64 /* same font family and style. See @FT_New_Size and @FT_Done_Size. */
66 /* Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only */
67 /* modify the contents of the current `active' size; you thus need */
68 /* to use @FT_Activate_Size to change it. */
70 /* 99% of applications won't need the functions provided here, */
71 /* especially if they use the caching sub-system, so be cautious */
72 /* when using these. */
74 /*************************************************************************/
77 /*************************************************************************/
83 /* Create a new size object from a given face object. */
86 /* face :: A handle to a parent face object. */
89 /* asize :: A handle to a new size object. */
92 /* FreeType error code. 0~means success. */
95 /* You need to call @FT_Activate_Size in order to select the new size */
96 /* for upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size, */
97 /* @FT_Load_Glyph, @FT_Load_Char, etc. */
100 FT_New_Size( FT_Face face,
104 /*************************************************************************/
110 /* Discard a given size object. Note that @FT_Done_Face */
111 /* automatically discards all size objects allocated with */
115 /* size :: A handle to a target size object. */
118 /* FreeType error code. 0~means success. */
120 FT_EXPORT( FT_Error )
121 FT_Done_Size( FT_Size size );
124 /*************************************************************************/
127 /* FT_Activate_Size */
130 /* Even though it is possible to create several size objects for a */
131 /* given face (see @FT_New_Size for details), functions like */
132 /* @FT_Load_Glyph or @FT_Load_Char only use the one which has been */
133 /* activated last to determine the `current character pixel size'. */
135 /* This function can be used to `activate' a previously created size */
139 /* size :: A handle to a target size object. */
142 /* FreeType error code. 0~means success. */
145 /* If `face' is the size's parent face object, this function changes */
146 /* the value of `face->size' to the input size handle. */
148 FT_EXPORT( FT_Error )
149 FT_Activate_Size( FT_Size size );
156 #endif /* __FTSIZES_H__ */