ReactOS 0.4.16-dev-1007-g2e85425
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_Set_MM_WeightVector (FT_Face face, FT_UInt len, FT_Fixed *weightvector)
 
 FT_Get_MM_WeightVector (FT_Face face, FT_UInt *len, FT_Fixed *weightvector)
 
 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 672 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:661
return FT_Err_Ok
Definition: ftbbox.c:527
#define FT_THROW(e)
Definition: ftdebug.h:241
#define FT_FREE(ptr)
Definition: ftmemory.h:328
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:65
static char memory[1024 *256]
Definition: process.c:116
FT_Memory memory
Definition: ftobjs.h:897

◆ FT_Get_MM_Blend_Coordinates()

FT_Get_MM_Blend_Coordinates ( FT_Face  face,
FT_UInt  num_coords,
FT_Fixed coords 
)

Definition at line 441 of file ftmm.c.

444 {
446 FT_Service_MultiMasters service;
447
448
449 /* check of `face' delayed to `ft_face_get_mm_service' */
450
451 if ( !coords )
452 return FT_THROW( Invalid_Argument );
453
454 error = ft_face_get_mm_service( face, &service );
455 if ( !error )
456 {
457 error = FT_ERR( Invalid_Argument );
458 if ( service->get_mm_blend )
459 error = service->get_mm_blend( face, num_coords, coords );
460 }
461
462 return error;
463 }
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:299
#define FT_ERR(e)
Definition: fttypes.h:599
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_MM_WeightVector()

FT_Get_MM_WeightVector ( FT_Face  face,
FT_UInt len,
FT_Fixed weightvector 
)

Definition at line 238 of file ftmm.c.

241 {
243 FT_Service_MultiMasters service;
244
245
246 /* check of `face' delayed to `ft_face_get_mm_service' */
247
248 if ( len && !weightvector )
249 return FT_THROW( Invalid_Argument );
250
251 error = ft_face_get_mm_service( face, &service );
252 if ( !error )
253 {
254 error = FT_ERR( Invalid_Argument );
255 if ( service->get_mm_weightvector )
256 error = service->get_mm_weightvector( face, len, weightvector );
257 }
258
259 return error;
260 }
GLenum GLsizei len
Definition: glext.h:6722

◆ 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 500 of file ftmm.c.

503 {
504 FT_UShort* axis_flags;
505
506
507 if ( !master || !flags )
508 return FT_THROW( Invalid_Argument );
509
510 if ( axis_index >= master->num_axis )
511 return FT_THROW( Invalid_Argument );
512
513 /* the axis flags array immediately follows the data of `master' */
514 axis_flags = (FT_UShort*)&( master[1] );
515 *flags = axis_flags[axis_index];
516
517 return FT_Err_Ok;
518 }
unsigned short FT_UShort
Definition: fttypes.h:209
GLbitfield flags
Definition: glext.h:7161
FT_UInt num_axis
Definition: ftmm.h:245

◆ FT_Get_Var_Blend_Coordinates()

FT_Get_Var_Blend_Coordinates ( FT_Face  face,
FT_UInt  num_coords,
FT_Fixed coords 
)

Definition at line 472 of file ftmm.c.

475 {
477 FT_Service_MultiMasters service;
478
479
480 /* check of `face' delayed to `ft_face_get_mm_service' */
481
482 if ( !coords )
483 return FT_THROW( Invalid_Argument );
484
485 error = ft_face_get_mm_service( face, &service );
486 if ( !error )
487 {
488 error = FT_ERR( Invalid_Argument );
489 if ( service->get_mm_blend )
490 error = service->get_mm_blend( face, num_coords, coords );
491 }
492
493 return error;
494 }

◆ FT_Get_Var_Design_Coordinates()

FT_Get_Var_Design_Coordinates ( FT_Face  face,
FT_UInt  num_coords,
FT_Fixed coords 
)

Definition at line 314 of file ftmm.c.

317 {
319 FT_Service_MultiMasters service;
320
321
322 /* check of `face' delayed to `ft_face_get_mm_service' */
323
324 if ( !coords )
325 return FT_THROW( Invalid_Argument );
326
327 error = ft_face_get_mm_service( face, &service );
328 if ( !error )
329 {
330 error = FT_ERR( Invalid_Argument );
331 if ( service->get_var_design )
332 error = service->get_var_design( face, num_coords, coords );
333 }
334
335 return error;
336 }

◆ FT_Set_MM_Blend_Coordinates()

FT_Set_MM_Blend_Coordinates ( FT_Face  face,
FT_UInt  num_coords,
FT_Fixed coords 
)

Definition at line 342 of file ftmm.c.

345 {
347 FT_Service_MultiMasters service_mm = NULL;
348 FT_Service_MetricsVariations service_mvar = NULL;
349
350
351 /* check of `face' delayed to `ft_face_get_mm_service' */
352
353 if ( num_coords && !coords )
354 return FT_THROW( Invalid_Argument );
355
356 error = ft_face_get_mm_service( face, &service_mm );
357 if ( !error )
358 {
359 error = FT_ERR( Invalid_Argument );
360 if ( service_mm->set_mm_blend )
361 error = service_mm->set_mm_blend( face, num_coords, coords );
362
363 /* internal error code -1 means `no change'; we can exit immediately */
364 if ( error == -1 )
365 return FT_Err_Ok;
366 }
367
368 if ( !error )
369 {
370 (void)ft_face_get_mvar_service( face, &service_mvar );
371
372 if ( service_mvar && service_mvar->metrics_adjust )
373 service_mvar->metrics_adjust( face );
374 }
375
376 /* enforce recomputation of auto-hinting data */
377 if ( !error && face->autohint.finalizer )
378 {
379 face->autohint.finalizer( face->autohint.data );
380 face->autohint.data = NULL;
381 }
382
383 return error;
384 }
#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_MM_WeightVector()

FT_Set_MM_WeightVector ( FT_Face  face,
FT_UInt  len,
FT_Fixed weightvector 
)

Definition at line 205 of file ftmm.c.

208 {
210 FT_Service_MultiMasters service;
211
212
213 /* check of `face' delayed to `ft_face_get_mm_service' */
214
215 if ( len && !weightvector )
216 return FT_THROW( Invalid_Argument );
217
218 error = ft_face_get_mm_service( face, &service );
219 if ( !error )
220 {
221 error = FT_ERR( Invalid_Argument );
222 if ( service->set_mm_weightvector )
223 error = service->set_mm_weightvector( face, len, weightvector );
224 }
225
226 /* enforce recomputation of auto-hinting data */
227 if ( !error && face->autohint.finalizer )
228 {
229 face->autohint.finalizer( face->autohint.data );
230 face->autohint.data = NULL;
231 }
232
233 return error;
234 }

◆ FT_Set_Named_Instance()

FT_Set_Named_Instance ( FT_Face  face,
FT_UInt  instance_index 
)

Definition at line 524 of file ftmm.c.

526 {
528
529 FT_Service_MultiMasters service_mm = NULL;
530 FT_Service_MetricsVariations service_mvar = NULL;
531
532
533 /* check of `face' delayed to `ft_face_get_mm_service' */
534
535 error = ft_face_get_mm_service( face, &service_mm );
536 if ( !error )
537 {
538 error = FT_ERR( Invalid_Argument );
539 if ( service_mm->set_instance )
540 error = service_mm->set_instance( face, instance_index );
541 }
542
543 if ( !error )
544 {
545 (void)ft_face_get_mvar_service( face, &service_mvar );
546
547 if ( service_mvar && service_mvar->metrics_adjust )
548 service_mvar->metrics_adjust( face );
549 }
550
551 /* enforce recomputation of auto-hinting data */
552 if ( !error && face->autohint.finalizer )
553 {
554 face->autohint.finalizer( face->autohint.data );
555 face->autohint.data = NULL;
556 }
557
558 if ( !error )
559 {
560 face->face_index = ( instance_index << 16 ) |
561 ( face->face_index & 0xFFFFL );
562 face->face_flags &= ~FT_FACE_FLAG_VARIATION;
563 }
564
565 return error;
566 }

◆ FT_Set_Var_Blend_Coordinates()

FT_Set_Var_Blend_Coordinates ( FT_Face  face,
FT_UInt  num_coords,
FT_Fixed coords 
)

Definition at line 393 of file ftmm.c.

396 {
398 FT_Service_MultiMasters service_mm = NULL;
399 FT_Service_MetricsVariations service_mvar = NULL;
400
401
402 /* check of `face' delayed to `ft_face_get_mm_service' */
403
404 if ( num_coords && !coords )
405 return FT_THROW( Invalid_Argument );
406
407 error = ft_face_get_mm_service( face, &service_mm );
408 if ( !error )
409 {
410 error = FT_ERR( Invalid_Argument );
411 if ( service_mm->set_mm_blend )
412 error = service_mm->set_mm_blend( face, num_coords, coords );
413
414 /* internal error code -1 means `no change'; we can exit immediately */
415 if ( error == -1 )
416 return FT_Err_Ok;
417 }
418
419 if ( !error )
420 {
421 (void)ft_face_get_mvar_service( face, &service_mvar );
422
423 if ( service_mvar && service_mvar->metrics_adjust )
424 service_mvar->metrics_adjust( face );
425 }
426
427 /* enforce recomputation of auto-hinting data */
428 if ( !error && face->autohint.finalizer )
429 {
430 face->autohint.finalizer( face->autohint.data );
431 face->autohint.data = NULL;
432 }
433
434 return error;
435 }

◆ FT_Set_Var_Design_Coordinates()

FT_Set_Var_Design_Coordinates ( FT_Face  face,
FT_UInt  num_coords,
FT_Fixed coords 
)

Definition at line 266 of file ftmm.c.

269 {
271 FT_Service_MultiMasters service_mm = NULL;
272 FT_Service_MetricsVariations service_mvar = NULL;
273
274
275 /* check of `face' delayed to `ft_face_get_mm_service' */
276
277 if ( num_coords && !coords )
278 return FT_THROW( Invalid_Argument );
279
280 error = ft_face_get_mm_service( face, &service_mm );
281 if ( !error )
282 {
283 error = FT_ERR( Invalid_Argument );
284 if ( service_mm->set_var_design )
285 error = service_mm->set_var_design( face, num_coords, coords );
286
287 /* internal error code -1 means `no change'; we can exit immediately */
288 if ( error == -1 )
289 return FT_Err_Ok;
290 }
291
292 if ( !error )
293 {
294 (void)ft_face_get_mvar_service( face, &service_mvar );
295
296 if ( service_mvar && service_mvar->metrics_adjust )
297 service_mvar->metrics_adjust( face );
298 }
299
300 /* enforce recomputation of auto-hinting data */
301 if ( !error && face->autohint.finalizer )
302 {
303 face->autohint.finalizer( face->autohint.data );
304 face->autohint.data = NULL;
305 }
306
307 return error;
308 }