1
/***************************************************************************/
5
/* Multiple Master font support (body). */
7
/* Copyright 1996-2001, 2003, 2004 by */
8
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
10
/* This file is part of the FreeType project, and may only be used, */
11
/* modified, and distributed under the terms of the FreeType project */
12
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13
/* this file you indicate that you have read the license and */
14
/* understand and accept it fully. */
16
/***************************************************************************/
20
#include FT_MULTIPLE_MASTERS_H
21
#include FT_INTERNAL_OBJECTS_H
22
#include FT_SERVICE_MULTIPLE_MASTERS_H
25
/*************************************************************************/
27
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
28
/* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
29
/* messages during execution. */
32
#define FT_COMPONENT trace_mm
36
ft_face_get_mm_service( FT_Face face,
37
FT_Service_MultiMasters *aservice )
45
return FT_Err_Invalid_Face_Handle;
47
error = FT_Err_Invalid_Argument;
49
if ( FT_HAS_MULTIPLE_MASTERS( face ) )
51
FT_FACE_LOOKUP_SERVICE( face,
63
/* documentation is in ftmm.h */
65
FT_EXPORT_DEF( FT_Error )
66
FT_Get_Multi_Master( FT_Face face,
67
FT_Multi_Master *amaster )
70
FT_Service_MultiMasters service;
73
error = ft_face_get_mm_service( face, &service );
76
error = FT_Err_Invalid_Argument;
77
if ( service->get_mm )
78
error = service->get_mm( face, amaster );
85
/* documentation is in ftmm.h */
87
FT_EXPORT_DEF( FT_Error )
88
FT_Get_MM_Var( FT_Face face,
92
FT_Service_MultiMasters service;
95
error = ft_face_get_mm_service( face, &service );
98
error = FT_Err_Invalid_Argument;
99
if ( service->get_mm_var )
100
error = service->get_mm_var( face, amaster );
107
/* documentation is in ftmm.h */
109
FT_EXPORT_DEF( FT_Error )
110
FT_Set_MM_Design_Coordinates( FT_Face face,
115
FT_Service_MultiMasters service;
118
error = ft_face_get_mm_service( face, &service );
121
error = FT_Err_Invalid_Argument;
122
if ( service->set_mm_design )
123
error = service->set_mm_design( face, num_coords, coords );
130
/* documentation is in ftmm.h */
132
FT_EXPORT_DEF( FT_Error )
133
FT_Set_Var_Design_Coordinates( FT_Face face,
138
FT_Service_MultiMasters service;
141
error = ft_face_get_mm_service( face, &service );
144
error = FT_Err_Invalid_Argument;
145
if ( service->set_var_design )
146
error = service->set_var_design( face, num_coords, coords );
153
/* documentation is in ftmm.h */
155
FT_EXPORT_DEF( FT_Error )
156
FT_Set_MM_Blend_Coordinates( FT_Face face,
161
FT_Service_MultiMasters service;
164
error = ft_face_get_mm_service( face, &service );
167
error = FT_Err_Invalid_Argument;
168
if ( service->set_mm_blend )
169
error = service->set_mm_blend( face, num_coords, coords );
176
/* documentation is in ftmm.h */
178
/* This is exactly the same as the previous function. It exists for */
181
FT_EXPORT_DEF( FT_Error )
182
FT_Set_Var_Blend_Coordinates( FT_Face face,
187
FT_Service_MultiMasters service;
190
error = ft_face_get_mm_service( face, &service );
193
error = FT_Err_Invalid_Argument;
194
if ( service->set_mm_blend )
195
error = service->set_mm_blend( face, num_coords, coords );