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
PFR Fonts
42
43

Synopsis

44
45
FT_Get_PFR_MetricsFT_Get_PFR_KerningFT_Get_PFR_Advance
46


47
 
48
49

This section contains the declaration of PFR-specific functions.

50

51
52

FT_Get_PFR_Metrics

53
54
Defined in FT_PFR_H (freetype/ftpfr.h).
55

56
57
 
58
  FT_EXPORT( FT_Error )
59
  FT_Get_PFR_Metrics( FT_Face    face,
60
                      FT_UInt   *aoutline_resolution,
61
                      FT_UInt   *ametrics_resolution,
62
                      FT_Fixed  *ametrics_x_scale,
63
                      FT_Fixed  *ametrics_y_scale );
64
 
65

66
67

Return the outline and metrics resolutions of a given PFR face.

68

69
input
70

71
72
face
73

Handle to the input face. It can be a non-PFR face.

74
75
76
77
output
78

79
80
aoutline_resolution
81

Outline resolution. This is equivalent to ‘face->units_per_EM’ for non-PFR fonts. Optional (parameter can be NULL).

82
83
ametrics_resolution
84

Metrics resolution. This is equivalent to ‘outline_resolution’ for non-PFR fonts. Optional (parameter can be NULL).

85
86
ametrics_x_scale
87

A 16.16 fixed-point number used to scale distance expressed in metrics units to device sub-pixels. This is equivalent to ‘face->size->x_scale’, but for metrics only. Optional (parameter can be NULL).

88
89
ametrics_y_scale
90

Same as ‘ametrics_x_scale’ but for the vertical direction. optional (parameter can be NULL).

91
92
93
94
return
95

FreeType error code. 0 means success.

96
97
note
98

If the input face is not a PFR, this function will return an error. However, in all cases, it will return valid values.

99
100
101

102
[Index]
103
104
[TOC]
105
 
106
107

FT_Get_PFR_Kerning

108
109
Defined in FT_PFR_H (freetype/ftpfr.h).
110

111
112
 
113
  FT_EXPORT( FT_Error )
114
  FT_Get_PFR_Kerning( FT_Face     face,
115
                      FT_UInt     left,
116
                      FT_UInt     right,
117
                      FT_Vector  *avector );
118
 
119

120
121

Return the kerning pair corresponding to two glyphs in a PFR face. The distance is expressed in metrics units, unlike the result of FT_Get_Kerning.

122

123
input
124

125
126
face
127

A handle to the input face.

128
129
left
130

Index of the left glyph.

131
132
right
133

Index of the right glyph.

134
135
136
137
output
138

139
140
avector
141

A kerning vector.

142
143
144
145
return
146

FreeType error code. 0 means success.

147
148
note
149

This function always return distances in original PFR metrics units. This is unlike FT_Get_Kerning with the FT_KERNING_UNSCALED mode, which always returns distances converted to outline units.

150

You can use the value of the ‘x_scale’ and ‘y_scale’ parameters returned by FT_Get_PFR_Metrics to scale these to device sub-pixels.

151
152
153

154
[Index]
155
156
[TOC]
157
 
158
159

FT_Get_PFR_Advance

160
161
Defined in FT_PFR_H (freetype/ftpfr.h).
162

163
164
 
165
  FT_EXPORT( FT_Error )
166
  FT_Get_PFR_Advance( FT_Face   face,
167
                      FT_UInt   gindex,
168
                      FT_Pos   *aadvance );
169
 
170

171
172

Return a given glyph advance, expressed in original metrics units, from a PFR font.

173

174
input
175

176
177
face
178

A handle to the input face.

179
180
gindex
181

The glyph index.

182
183
184
185
output
186

187
188
aadvance
189

The glyph advance in metrics units.

190
191
192
193
return
194

FreeType error code. 0 means success.

195
196
note
197

You can use the ‘x_scale’ or ‘y_scale’ results of FT_Get_PFR_Metrics to convert the advance to device sub-pixels (i.e., 1/64th of pixels).

198
199
200

201
[Index]
202
203
[TOC]
204
 
205
206