Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed










Rev Author Line No. Line
4349 Serge 1
2
"http://www.w3.org/TR/html4/loose.dtd">
3
4
5
6
FreeType-2.5.0 API Reference
7
32
33
34
 
35
[Index]
36
37
[TOC]
38

FreeType-2.5.0 API Reference

39
 
40

41
Size Management
42
43

Synopsis

44
45
FT_New_SizeFT_Done_SizeFT_Activate_Size
46


47
 
48
49

When creating a new face object (e.g., with FT_New_Face), an FT_Size object is automatically created and used to store all pixel-size dependent information, available in the ‘face->size’ field.

50

It is however possible to create more sizes for a given face, mostly in order to manage several character pixel sizes of the same font family and style. See FT_New_Size and FT_Done_Size.

51

Note that FT_Set_Pixel_Sizes and FT_Set_Char_Size only modify the contents of the current ‘active’ size; you thus need to use FT_Activate_Size to change it.

52

99% of applications won't need the functions provided here, especially if they use the caching sub-system, so be cautious when using these.

53

54
55

FT_New_Size

56
57
Defined in FT_SIZES_H (freetype/ftsizes.h).
58

59
60
 
61
  FT_EXPORT( FT_Error )
62
  FT_New_Size( FT_Face   face,
63
               FT_Size*  size );
64
 
65

66
67

Create a new size object from a given face object.

68

69
input
70

71
72
face
73

A handle to a parent face object.

74
75
76
77
output
78

79
80
asize
81

A handle to a new size object.

82
83
84
85
return
86

FreeType error code. 0 means success.

87
88
note
89

You need to call FT_Activate_Size in order to select the new size for upcoming calls to FT_Set_Pixel_Sizes, FT_Set_Char_Size, FT_Load_Glyph, FT_Load_Char, etc.

90
91
92

93
[Index]
94
95
[TOC]
96
 
97
98

FT_Done_Size

99
100
Defined in FT_SIZES_H (freetype/ftsizes.h).
101

102
103
 
104
  FT_EXPORT( FT_Error )
105
  FT_Done_Size( FT_Size  size );
106
 
107

108
109

Discard a given size object. Note that FT_Done_Face automatically discards all size objects allocated with FT_New_Size.

110

111
input
112

113
114
size
115

A handle to a target size object.

116
117
118
119
return
120

FreeType error code. 0 means success.

121
122
123

124
[Index]
125
126
[TOC]
127
 
128
129

FT_Activate_Size

130
131
Defined in FT_SIZES_H (freetype/ftsizes.h).
132

133
134
 
135
  FT_EXPORT( FT_Error )
136
  FT_Activate_Size( FT_Size  size );
137
 
138

139
140

Even though it is possible to create several size objects for a given face (see FT_New_Size for details), functions like FT_Load_Glyph or FT_Load_Char only use the one which has been activated last to determine the ‘current character pixel size’.

141

This function can be used to ‘activate’ a previously created size object.

142

143
input
144

145
146
size
147

A handle to a target size object.

148
149
150
151
return
152

FreeType error code. 0 means success.

153
154
note
155

If ‘face’ is the size's parent face object, this function changes the value of ‘face->size’ to the input size handle.

156
157
158

159
[Index]
160
161
[TOC]
162
 
163
164