ReactOS 0.4.15-dev-7931-gfd331f1
ftmm.h File Reference
#include <ft2build.h>
Include dependency graph for ftmm.h:

Go to the source code of this file.

Classes

struct  FT_MM_Axis_
 
struct  FT_Multi_Master_
 
struct  FT_Var_Axis_
 
struct  FT_Var_Named_Style_
 
struct  FT_MM_Var_
 

Macros

#define FT_VAR_AXIS_FLAG_HIDDEN   1
 

Typedefs

typedef FT_BEGIN_HEADER struct FT_MM_Axis_ FT_MM_Axis
 
typedef struct FT_Multi_Master_ FT_Multi_Master
 
typedef struct FT_Var_Axis_ FT_Var_Axis
 
typedef struct FT_Var_Named_Style_ FT_Var_Named_Style
 
typedef struct FT_MM_Var_ FT_MM_Var
 

Functions

 FT_Get_Multi_Master (FT_Face face, FT_Multi_Master *amaster)
 
 FT_Get_MM_Var (FT_Face face, FT_MM_Var **amaster)
 
 FT_Done_MM_Var (FT_Library library, FT_MM_Var *amaster)
 
 FT_Set_MM_Design_Coordinates (FT_Face face, FT_UInt num_coords, FT_Long *coords)
 
 FT_Set_Var_Design_Coordinates (FT_Face face, FT_UInt num_coords, FT_Fixed *coords)
 
 FT_Get_Var_Design_Coordinates (FT_Face face, FT_UInt num_coords, FT_Fixed *coords)
 
 FT_Set_MM_Blend_Coordinates (FT_Face face, FT_UInt num_coords, FT_Fixed *coords)
 
 FT_Get_MM_Blend_Coordinates (FT_Face face, FT_UInt num_coords, FT_Fixed *coords)
 
 FT_Set_Var_Blend_Coordinates (FT_Face face, FT_UInt num_coords, FT_Fixed *coords)
 
 FT_Get_Var_Blend_Coordinates (FT_Face face, FT_UInt num_coords, FT_Fixed *coords)
 
 FT_Get_Var_Axis_Flags (FT_MM_Var *master, FT_UInt axis_index, FT_UInt *flags)
 
 FT_Set_Named_Instance (FT_Face face, FT_UInt instance_index)
 

Macro Definition Documentation

◆ FT_VAR_AXIS_FLAG_HIDDEN

#define FT_VAR_AXIS_FLAG_HIDDEN   1

Definition at line 560 of file ftmm.h.

Typedef Documentation

◆ FT_MM_Axis

◆ FT_MM_Var

◆ FT_Multi_Master

◆ FT_Var_Axis

◆ FT_Var_Named_Style

Function Documentation

◆ FT_Done_MM_Var()

FT_Done_MM_Var ( FT_Library  library,
FT_MM_Var amaster 
)

Definition at line 151 of file ftmm.c.

153 {
155
156
157 if ( !library )
158 return FT_THROW( Invalid_Library_Handle );
159
161 FT_FREE( amaster );
162
163 return FT_Err_Ok;
164 }
FT_Library library
Definition: cffdrivr.c:654
return FT_Err_Ok
Definition: ftbbox.c:511
#define FT_THROW(e)
Definition: ftdebug.h:213
#define FT_FREE(ptr)
Definition: ftmemory.h:329
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
static char memory[1024 *256]
Definition: process.c:116
FT_Memory memory
Definition: ftobjs.h:918

◆ FT_Get_MM_Blend_Coordinates()

FT_Get_MM_Blend_Coordinates ( FT_Face  face,
FT_UInt  num_coords,
FT_Fixed coords 
)

Definition at line 380 of file ftmm.c.

383 {
385 FT_Service_MultiMasters service;
386
387
388 /* check of `face' delayed to `ft_face_get_mm_service' */
389
390 if ( !coords )
391 return FT_THROW( Invalid_Argument );
392
393 error = ft_face_get_mm_service( face, &service );
394 if ( !error )
395 {
396 error = FT_ERR( Invalid_Argument );
397 if ( service->get_mm_blend )
398 error = service->get_mm_blend( face, num_coords, coords );
399 }
400
401 return error;
402 }
static FT_Error ft_face_get_mm_service(FT_Face face, FT_Service_MultiMasters *aservice)
Definition: ftmm.c:39
int FT_Error
Definition: fttypes.h:300
#define FT_ERR(e)
Definition: fttypes.h:586
GLuint coords
Definition: glext.h:7368
GLenum GLuint GLint GLenum face
Definition: glext.h:7025
#define error(str)
Definition: mkdosfs.c:1605

◆ FT_Get_MM_Var()

FT_Get_MM_Var ( FT_Face  face,
FT_MM_Var **  amaster 
)

Definition at line 124 of file ftmm.c.

126 {
128 FT_Service_MultiMasters service;
129
130
131 /* check of `face' delayed to `ft_face_get_mm_service' */
132
133 if ( !amaster )
134 return FT_THROW( Invalid_Argument );
135
136 error = ft_face_get_mm_service( face, &service );
137 if ( !error )
138 {
139 error = FT_ERR( Invalid_Argument );
140 if ( service->get_mm_var )
141 error = service->get_mm_var( face, amaster );
142 }
143
144 return error;
145 }

◆ FT_Get_Multi_Master()

FT_Get_Multi_Master ( FT_Face  face,
FT_Multi_Master amaster 
)

Definition at line 97 of file ftmm.c.

99 {
101 FT_Service_MultiMasters service;
102
103
104 /* check of `face' delayed to `ft_face_get_mm_service' */
105
106 if ( !amaster )
107 return FT_THROW( Invalid_Argument );
108
109 error = ft_face_get_mm_service( face, &service );
110 if ( !error )
111 {
112 error = FT_ERR( Invalid_Argument );
113 if ( service->get_mm )
114 error = service->get_mm( face, amaster );
115 }
116
117 return error;
118 }

◆ FT_Get_Var_Axis_Flags()

FT_Get_Var_Axis_Flags ( FT_MM_Var master,
FT_UInt  axis_index,
FT_UInt flags 
)

Definition at line 439 of file ftmm.c.

442 {
443 FT_UShort* axis_flags;
444
445
446 if ( !master || !flags )
447 return FT_THROW( Invalid_Argument );
448
449 if ( axis_index >= master->num_axis )
450 return FT_THROW( Invalid_Argument );
451
452 /* the axis flags array immediately follows the data of `master' */
453 axis_flags = (FT_UShort*)&( master[1] );
454 *flags = axis_flags[axis_index];
455
456 return FT_Err_Ok;
457 }
unsigned short FT_UShort
Definition: fttypes.h:209
GLbitfield flags
Definition: glext.h:7161
FT_UInt num_axis
Definition: ftmm.h:239

◆ FT_Get_Var_Blend_Coordinates()

FT_Get_Var_Blend_Coordinates ( FT_Face  face,
FT_UInt  num_coords,
FT_Fixed coords 
)

Definition at line 411 of file ftmm.c.

414 {
416 FT_Service_MultiMasters service;
417
418
419 /* check of `face' delayed to `ft_face_get_mm_service' */
420
421 if ( !coords )
422 return FT_THROW( Invalid_Argument );
423
424 error = ft_face_get_mm_service( face, &service );
425 if ( !error )
426 {
427 error = FT_ERR( Invalid_Argument );
428 if ( service->get_mm_blend )
429 error = service->get_mm_blend( face, num_coords, coords );
430 }
431
432 return error;
433 }

◆ FT_Get_Var_Design_Coordinates()

FT_Get_Var_Design_Coordinates ( FT_Face  face,
FT_UInt  num_coords,
FT_Fixed coords 
)

Definition at line 253 of file ftmm.c.

256 {
258 FT_Service_MultiMasters service;
259
260
261 /* check of `face' delayed to `ft_face_get_mm_service' */
262
263 if ( !coords )
264 return FT_THROW( Invalid_Argument );
265
266 error = ft_face_get_mm_service( face, &service );
267 if ( !error )
268 {
269 error = FT_ERR( Invalid_Argument );
270 if ( service->get_var_design )
271 error = service->get_var_design( face, num_coords, coords );
272 }
273
274 return error;
275 }

◆ FT_Set_MM_Blend_Coordinates()

FT_Set_MM_Blend_Coordinates ( FT_Face  face,
FT_UInt  num_coords,
FT_Fixed coords 
)

Definition at line 281 of file ftmm.c.

284 {
286 FT_Service_MultiMasters service_mm = NULL;
287 FT_Service_MetricsVariations service_mvar = NULL;
288
289
290 /* check of `face' delayed to `ft_face_get_mm_service' */
291
292 if ( num_coords && !coords )
293 return FT_THROW( Invalid_Argument );
294
295 error = ft_face_get_mm_service( face, &service_mm );
296 if ( !error )
297 {
298 error = FT_ERR( Invalid_Argument );
299 if ( service_mm->set_mm_blend )
300 error = service_mm->set_mm_blend( face, num_coords, coords );
301
302 /* internal error code -1 means `no change'; we can exit immediately */
303 if ( error == -1 )
304 return FT_Err_Ok;
305 }
306
307 if ( !error )
308 {
309 (void)ft_face_get_mvar_service( face, &service_mvar );
310
311 if ( service_mvar && service_mvar->metrics_adjust )
312 service_mvar->metrics_adjust( face );
313 }
314
315 /* enforce recomputation of auto-hinting data */
316 if ( !error && face->autohint.finalizer )
317 {
318 face->autohint.finalizer( face->autohint.data );
319 face->autohint.data = NULL;
320 }
321
322 return error;
323 }
#define NULL
Definition: types.h:112
static FT_Error ft_face_get_mvar_service(FT_Face face, FT_Service_MetricsVariations *aservice)
Definition: ftmm.c:67

◆ FT_Set_MM_Design_Coordinates()

FT_Set_MM_Design_Coordinates ( FT_Face  face,
FT_UInt  num_coords,
FT_Long coords 
)

Definition at line 170 of file ftmm.c.

173 {
175 FT_Service_MultiMasters service;
176
177
178 /* check of `face' delayed to `ft_face_get_mm_service' */
179
180 if ( num_coords && !coords )
181 return FT_THROW( Invalid_Argument );
182
183 error = ft_face_get_mm_service( face, &service );
184 if ( !error )
185 {
186 error = FT_ERR( Invalid_Argument );
187 if ( service->set_mm_design )
188 error = service->set_mm_design( face, num_coords, coords );
189 }
190
191 /* enforce recomputation of auto-hinting data */
192 if ( !error && face->autohint.finalizer )
193 {
194 face->autohint.finalizer( face->autohint.data );
195 face->autohint.data = NULL;
196 }
197
198 return error;
199 }

◆ FT_Set_Named_Instance()

FT_Set_Named_Instance ( FT_Face  face,
FT_UInt  instance_index 
)

Definition at line 463 of file ftmm.c.

465 {
467
468 FT_Service_MultiMasters service_mm = NULL;
469 FT_Service_MetricsVariations service_mvar = NULL;
470
471
472 /* check of `face' delayed to `ft_face_get_mm_service' */
473
474 error = ft_face_get_mm_service( face, &service_mm );
475 if ( !error )
476 {
477 error = FT_ERR( Invalid_Argument );
478 if ( service_mm->set_instance )
479 error = service_mm->set_instance( face, instance_index );
480 }
481
482 if ( !error )
483 {
484 (void)ft_face_get_mvar_service( face, &service_mvar );
485
486 if ( service_mvar && service_mvar->metrics_adjust )
487 service_mvar->metrics_adjust( face );
488 }
489
490 /* enforce recomputation of auto-hinting data */
491 if ( !error && face->autohint.finalizer )
492 {
493 face->autohint.finalizer( face->autohint.data );
494 face->autohint.data = NULL;
495 }
496
497 if ( !error )
498 {
499 face->face_index = ( instance_index << 16 ) |
500 ( face->face_index & 0xFFFFL );
501 face->face_flags &= ~FT_FACE_FLAG_VARIATION;
502 }
503
504 return error;
505 }

◆ FT_Set_Var_Blend_Coordinates()

FT_Set_Var_Blend_Coordinates ( FT_Face  face,
FT_UInt  num_coords,
FT_Fixed coords 
)

Definition at line 332 of file ftmm.c.

335 {
337 FT_Service_MultiMasters service_mm = NULL;
338 FT_Service_MetricsVariations service_mvar = NULL;
339
340
341 /* check of `face' delayed to `ft_face_get_mm_service' */
342
343 if ( num_coords && !coords )
344 return FT_THROW( Invalid_Argument );
345
346 error = ft_face_get_mm_service( face, &service_mm );
347 if ( !error )
348 {
349 error = FT_ERR( Invalid_Argument );
350 if ( service_mm->set_mm_blend )
351 error = service_mm->set_mm_blend( face, num_coords, coords );
352
353 /* internal error code -1 means `no change'; we can exit immediately */
354 if ( error == -1 )
355 return FT_Err_Ok;
356 }
357
358 if ( !error )
359 {
360 (void)ft_face_get_mvar_service( face, &service_mvar );
361
362 if ( service_mvar && service_mvar->metrics_adjust )
363 service_mvar->metrics_adjust( face );
364 }
365
366 /* enforce recomputation of auto-hinting data */
367 if ( !error && face->autohint.finalizer )
368 {
369 face->autohint.finalizer( face->autohint.data );
370 face->autohint.data = NULL;
371 }
372
373 return error;
374 }

◆ FT_Set_Var_Design_Coordinates()

FT_Set_Var_Design_Coordinates ( FT_Face  face,
FT_UInt  num_coords,
FT_Fixed coords 
)

Definition at line 205 of file ftmm.c.

208 {
210 FT_Service_MultiMasters service_mm = NULL;
211 FT_Service_MetricsVariations service_mvar = NULL;
212
213
214 /* check of `face' delayed to `ft_face_get_mm_service' */
215
216 if ( num_coords && !coords )
217 return FT_THROW( Invalid_Argument );
218
219 error = ft_face_get_mm_service( face, &service_mm );
220 if ( !error )
221 {
222 error = FT_ERR( Invalid_Argument );
223 if ( service_mm->set_var_design )
224 error = service_mm->set_var_design( face, num_coords, coords );
225
226 /* internal error code -1 means `no change'; we can exit immediately */
227 if ( error == -1 )
228 return FT_Err_Ok;
229 }
230
231 if ( !error )
232 {
233 (void)ft_face_get_mvar_service( face, &service_mvar );
234
235 if ( service_mvar && service_mvar->metrics_adjust )
236 service_mvar->metrics_adjust( face );
237 }
238
239 /* enforce recomputation of auto-hinting data */
240 if ( !error && face->autohint.finalizer )
241 {
242 face->autohint.finalizer( face->autohint.data );
243 face->autohint.data = NULL;
244 }
245
246 return error;
247 }