#include <ft2build.h>
#include "ttmtx.h"
#include "sferrors.h"
Go to the source code of this file.
◆ FT_COMPONENT
#define FT_COMPONENT trace_ttmtx |
◆ FT_STRUCTURE
◆ tt_face_get_metrics()
Definition at line 218 of file ttmtx.c.
223 {
229
230#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
231 FT_Service_MetricsVariations
var =
232 (FT_Service_MetricsVariations)
face->var;
233#endif
234
235
237 {
238 void*
v = &
face->vertical;
239
240
242 table_pos =
face->vert_metrics_offset;
244 }
245 else
246 {
248 table_pos =
face->horz_metrics_offset;
250 }
251
253
254 k =
header->number_Of_HMetrics;
255
257 {
259 {
260 table_pos += 4 * gindex;
261 if ( table_pos + 4 > table_end )
262 goto NoData;
263
267 goto NoData;
268 }
269 else
270 {
271 table_pos += 4 * (
k - 1 );
272 if ( table_pos + 4 > table_end )
273 goto NoData;
274
277 goto NoData;
278
279 table_pos += 4 + 2 * ( gindex -
k );
280 if ( table_pos + 2 > table_end )
281 *abearing = 0;
282 else
283 {
286 }
287 }
288 }
289 else
290 {
291 NoData:
292 *abearing = 0;
293 *aadvance = 0;
294 }
295
296#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
298 {
302
303
304 if ( vertical )
305 {
306 if (
var->vadvance_adjust )
307 var->vadvance_adjust(
f, gindex, &
a );
308 if (
var->tsb_adjust )
309 var->tsb_adjust(
f, gindex, &
b );
310 }
311 else
312 {
313 if (
var->hadvance_adjust )
314 var->hadvance_adjust(
f, gindex, &
a );
315 if (
var->lsb_adjust )
316 var->lsb_adjust(
f, gindex, &
b );
317 }
318
321 }
322#endif
323 }
#define FT_READ_USHORT(var)
#define FT_STREAM_SEEK(position)
#define FT_READ_SHORT(var)
GLenum GLuint GLint GLenum face
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
◆ tt_face_load_hhea()
Definition at line 124 of file ttmtx.c.
127 {
130
132 {
133#undef FT_STRUCTURE
134#define FT_STRUCTURE TT_HoriHeader
135
155 };
156
157
158 if ( vertical )
159 {
160 void *
v = &
face->vertical;
161
162
166
168 }
169 else
170 {
174
176 }
177
180
184
187
190 }
#define FT_TRACE3(varformat)
#define FT_FRAME_SHORT(f)
#define FT_FRAME_ULONG(f)
#define FT_STREAM_READ_FIELDS(fields, object)
#define FT_FRAME_START(size)
#define FT_FRAME_USHORT(f)
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
_Reserved_ PVOID Reserved
◆ tt_face_load_hmtx()
Definition at line 70 of file ttmtx.c.
73 {
78
79
80 if ( vertical )
81 {
83 ptable_offset = &
face->vert_metrics_offset;
84 ptable_size = &
face->vert_metrics_size;
85 }
86 else
87 {
89 ptable_offset = &
face->horz_metrics_offset;
90 ptable_size = &
face->horz_metrics_size;
91 }
92
96
99
102 }