The BIG graph update
[rrdtool.git] / libraries / freetype-2.0.5 / include / freetype / ftmm.h
1 /***************************************************************************/
2 /*                                                                         */
3 /*  ftmm.h                                                                 */
4 /*                                                                         */
5 /*    FreeType Multiple Master font interface (specification).             */
6 /*                                                                         */
7 /*  Copyright 1996-2001 by                                                 */
8 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
9 /*                                                                         */
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.                                        */
15 /*                                                                         */
16 /***************************************************************************/
17
18
19 #ifndef __FTMM_H__
20 #define __FTMM_H__
21
22
23 #include <ft2build.h>
24 #include FT_TYPE1_TABLES_H
25
26
27 FT_BEGIN_HEADER
28
29
30   /*************************************************************************/
31   /*                                                                       */
32   /* <Section>                                                             */
33   /*    multiple_masters                                                   */
34   /*                                                                       */
35   /* <Title>                                                               */
36   /*    Multiple Masters                                                   */
37   /*                                                                       */
38   /* <Abstract>                                                            */
39   /*    How to manage Multiple Masters fonts.                              */
40   /*                                                                       */
41   /* <Description>                                                         */
42   /*    The following types and functions are used to manage Multiple      */
43   /*    Master fonts, i.e. the selection of specific design instances by   */
44   /*    setting design axis coordinates.                                   */
45   /*                                                                       */
46   /*************************************************************************/
47
48
49   /*************************************************************************/
50   /*                                                                       */
51   /* <Struct>                                                              */
52   /*    FT_MM_Axis                                                         */
53   /*                                                                       */
54   /* <Description>                                                         */
55   /*    A simple structure used to model a given axis in design space for  */
56   /*    Multiple Masters fonts.                                            */
57   /*                                                                       */
58   /* <Fields>                                                              */
59   /*    name    :: The axis's name.                                        */
60   /*                                                                       */
61   /*    minimum :: The axis's minimum design coordinate.                   */
62   /*                                                                       */
63   /*    maximum :: The axis's maximum design coordinate.                   */
64   /*                                                                       */
65   typedef struct  FT_MM_Axis_
66   {
67     FT_String*  name;
68     FT_Long     minimum;
69     FT_Long     maximum;
70
71   } FT_MM_Axis;
72
73
74   /*************************************************************************/
75   /*                                                                       */
76   /* <Struct>                                                              */
77   /*    FT_Multi_Master                                                    */
78   /*                                                                       */
79   /* <Description>                                                         */
80   /*    A structure used to model the axes and space of a Multiple Masters */
81   /*    font.                                                              */
82   /*                                                                       */
83   /* <Fields>                                                              */
84   /*    num_axis    :: Number of axes.  Cannot exceed 4.                   */
85   /*                                                                       */
86   /*    num_designs :: Number of designs; should ne normally 2^num_axis    */
87   /*                   even though the Type 1 specification strangely      */
88   /*                   allows for intermediate designs to be present. This */
89   /*                   number cannot exceed 16.                            */
90   /*                                                                       */
91   /*    axis        :: A table of axis descriptors.                        */
92   /*                                                                       */
93   typedef struct  FT_Multi_Master_
94   {
95     FT_UInt     num_axis;
96     FT_UInt     num_designs;
97     FT_MM_Axis  axis[T1_MAX_MM_AXIS];
98
99   } FT_Multi_Master;
100
101   /* */
102
103   typedef FT_Error
104   (*FT_Get_MM_Func)( FT_Face           face,
105                      FT_Multi_Master*  master );
106
107   typedef FT_Error
108   (*FT_Set_MM_Design_Func)( FT_Face   face,
109                             FT_UInt   num_coords,
110                             FT_Long*  coords );
111
112   typedef FT_Error
113   (*FT_Set_MM_Blend_Func)( FT_Face   face,
114                            FT_UInt   num_coords,
115                            FT_Long*  coords );
116
117
118   /*************************************************************************/
119   /*                                                                       */
120   /* <Function>                                                            */
121   /*    FT_Get_Multi_Master                                                */
122   /*                                                                       */
123   /* <Description>                                                         */
124   /*    Retrieves the Multiple Master descriptor of a given font.          */
125   /*                                                                       */
126   /* <Input>                                                               */
127   /*    face    :: A handle to the source face.                            */
128   /*                                                                       */
129   /* <Output>                                                              */
130   /*    amaster :: The Multiple Masters descriptor.                        */
131   /*                                                                       */
132   /* <Return>                                                              */
133   /*    FreeType error code.  0 means success.                             */
134   /*                                                                       */
135   FT_EXPORT( FT_Error )
136   FT_Get_Multi_Master( FT_Face           face,
137                        FT_Multi_Master  *amaster );
138
139
140   /*************************************************************************/
141   /*                                                                       */
142   /* <Function>                                                            */
143   /*    FT_Set_MM_Design_Coordinates                                       */
144   /*                                                                       */
145   /* <Description>                                                         */
146   /*    For Multiple Masters fonts, choose an interpolated font design     */
147   /*    through design coordinates.                                        */
148   /*                                                                       */
149   /* <InOut>                                                               */
150   /*    face       :: A handle to the source face.                         */
151   /*                                                                       */
152   /* <Input>                                                               */
153   /*    num_coords :: The number of design coordinates (must be equal to   */
154   /*                  the number of axes in the font).                     */
155   /*                                                                       */
156   /*    coords     :: An array of design coordinates.                      */
157   /*                                                                       */
158   /* <Return>                                                              */
159   /*    FreeType error code.  0 means success.                             */
160   /*                                                                       */
161   FT_EXPORT( FT_Error )
162   FT_Set_MM_Design_Coordinates( FT_Face   face,
163                                 FT_UInt   num_coords,
164                                 FT_Long*  coords );
165
166
167   /*************************************************************************/
168   /*                                                                       */
169   /* <Function>                                                            */
170   /*    FT_Set_MM_Blend_Coordinates                                        */
171   /*                                                                       */
172   /* <Description>                                                         */
173   /*    For Multiple Masters fonts, choose an interpolated font design     */
174   /*    through normalized blend coordinates.                              */
175   /*                                                                       */
176   /* <InOut>                                                               */
177   /*    face       :: A handle to the source face.                         */
178   /*                                                                       */
179   /* <Input>                                                               */
180   /*    num_coords :: The number of design coordinates (must be equal to   */
181   /*                  the number of axes in the font).                     */
182   /*                                                                       */
183   /*    coords     :: The design coordinates array (each element must be   */
184   /*                  between 0 and 1.0).                                  */
185   /*                                                                       */
186   /* <Return>                                                              */
187   /*    FreeType error code.  0 means success.                             */
188   /*                                                                       */
189   FT_EXPORT( FT_Error )
190   FT_Set_MM_Blend_Coordinates( FT_Face    face,
191                                FT_UInt    num_coords,
192                                FT_Fixed*  coords );
193
194
195   /* */
196
197
198 FT_END_HEADER
199
200 #endif /* __FTMM_H__ */
201
202
203 /* END */