1 /***************************************************************************/
5 /* Multiple Master font support (body). */
7 /* Copyright 1996-2001 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
24 /*************************************************************************/
26 /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
27 /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
28 /* messages during execution. */
31 #define FT_COMPONENT trace_mm
34 /* documentation is in ftmm.h */
36 FT_EXPORT_DEF( FT_Error )
37 FT_Get_Multi_Master( FT_Face face,
38 FT_Multi_Master *amaster )
44 return FT_Err_Invalid_Face_Handle;
46 error = FT_Err_Invalid_Argument;
48 if ( FT_HAS_MULTIPLE_MASTERS( face ) )
50 FT_Driver driver = face->driver;
54 func = (FT_Get_MM_Func)driver->root.clazz->get_interface(
55 FT_MODULE( driver ), "get_mm" );
57 error = func( face, amaster );
64 /* documentation is in ftmm.h */
66 FT_EXPORT_DEF( FT_Error )
67 FT_Set_MM_Design_Coordinates( FT_Face face,
75 return FT_Err_Invalid_Face_Handle;
77 error = FT_Err_Invalid_Argument;
79 if ( FT_HAS_MULTIPLE_MASTERS( face ) )
81 FT_Driver driver = face->driver;
82 FT_Set_MM_Design_Func func;
85 func = (FT_Set_MM_Design_Func)driver->root.clazz->get_interface(
86 FT_MODULE( driver ), "set_mm_design" );
88 error = func( face, num_coords, coords );
95 /* documentation is in ftmm.h */
97 FT_EXPORT_DEF( FT_Error )
98 FT_Set_MM_Blend_Coordinates( FT_Face face,
106 return FT_Err_Invalid_Face_Handle;
108 error = FT_Err_Invalid_Argument;
110 if ( FT_HAS_MULTIPLE_MASTERS( face ) )
112 FT_Driver driver = face->driver;
113 FT_Set_MM_Blend_Func func;
116 func = (FT_Set_MM_Blend_Func)driver->root.clazz->get_interface(
117 FT_MODULE( driver ), "set_mm_blend" );
119 error = func( face, num_coords, coords );