]> git.saurik.com Git - wxWidgets.git/blame - src/freetype/freetype/ftmm.h
Latest updates from SciTech code tree including numerous warning fixes for
[wxWidgets.git] / src / freetype / freetype / ftmm.h
CommitLineData
cabec872
RR
1/***************************************************************************/
2/* */
3/* ftmm.h */
4/* */
5/* FreeType Multiple Master font interface (specification). */
6/* */
7/* Copyright 1996-2000 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#include <freetype/t1tables.h>
23
24#ifdef __cplusplus
25 extern "C" {
26#endif
27
28
29 /*************************************************************************/
30 /* */
31 /* <Struct> */
32 /* FT_MM_Axis */
33 /* */
34 /* <Description> */
35 /* A simple structure used to model a given axis in design space for */
36 /* Multiple Masters fonts. */
37 /* */
38 /* <Fields> */
39 /* name :: The axis's name. */
40 /* */
41 /* minimum :: The axis's minimum design coordinate. */
42 /* */
43 /* maximum :: The axis's maximum design coordinate. */
44 /* */
45 typedef struct FT_MM_Axis_
46 {
47 FT_String* name;
48 FT_Long minimum;
49 FT_Long maximum;
50
51 } FT_MM_Axis;
52
53
54 /*************************************************************************/
55 /* */
56 /* <Struct> */
57 /* FT_Multi_Master */
58 /* */
59 /* <Description> */
60 /* A structure used to model the axes and space of a Multiple Masters */
61 /* font. */
62 /* */
63 /* <Fields> */
64 /* num_axis :: Number of axes. Cannot exceed 4. */
65 /* */
66 /* num_designs :: Number of designs; should ne normally 2^num_axis */
67 /* even though the Type 1 specification strangely */
68 /* allows for intermediate designs to be present. This */
69 /* number cannot exceed 16. */
70 /* */
71 /* axis :: A table of axis descriptors. */
72 /* */
73 typedef struct FT_Multi_Master_
74 {
75 FT_UInt num_axis;
76 FT_UInt num_designs;
77 FT_MM_Axis axis[T1_MAX_MM_AXIS];
78
79 } FT_Multi_Master;
80
81
82 typedef FT_Error (*FT_Get_MM_Func)( FT_Face face,
83 FT_Multi_Master* master );
84
85 typedef FT_Error (*FT_Set_MM_Design_Func)( FT_Face face,
86 FT_UInt num_coords,
87 FT_Long* coords );
88
89 typedef FT_Error (*FT_Set_MM_Blend_Func)( FT_Face face,
90 FT_UInt num_coords,
91 FT_Long* coords );
92
93
94 /*************************************************************************/
95 /* */
96 /* <Function> */
97 /* FT_Get_Multi_Master */
98 /* */
99 /* <Description> */
100 /* Retrieves the Multiple Master descriptor of a given font. */
101 /* */
102 /* <Input> */
103 /* face :: A handle to the source face. */
104 /* */
105 /* <Output> */
106 /* master :: The Multiple Masters descriptor. */
107 /* */
108 /* <Return> */
109 /* FreeType error code. 0 means success. */
110 /* */
111 FT_EXPORT_DEF( FT_Error ) FT_Get_Multi_Master( FT_Face face,
112 FT_Multi_Master* master );
113
114
115 /*************************************************************************/
116 /* */
117 /* <Function> */
118 /* FT_Set_MM_Design_Coordinates */
119 /* */
120 /* <Description> */
121 /* For Multiple Masters fonts, choose an interpolated font design */
122 /* through design coordinates. */
123 /* */
124 /* <Input> */
125 /* face :: A handle to the source face. */
126 /* */
127 /* num_coords :: The number of design coordinates (must be equal to */
128 /* the number of axes in the font). */
129 /* */
130 /* coords :: The design coordinates. */
131 /* */
132 /* <Return> */
133 /* FreeType error code. 0 means success. */
134 /* */
135 FT_EXPORT_DEF( FT_Error ) FT_Set_MM_Design_Coordinates(
136 FT_Face face,
137 FT_UInt num_coords,
138 FT_Long* coords );
139
140
141 /*************************************************************************/
142 /* */
143 /* <Function> */
144 /* FT_Set_MM_Blend_Coordinates */
145 /* */
146 /* <Description> */
147 /* For Multiple Masters fonts, choose an interpolated font design */
148 /* through normalized blend coordinates. */
149 /* */
150 /* <Input> */
151 /* face :: A handle to the source face. */
152 /* */
153 /* num_coords :: The number of design coordinates (must be equal to */
154 /* the number of axes in the font). */
155 /* */
156 /* coords :: The design coordinates (each one must be between 0 */
157 /* and 1.0). */
158 /* */
159 /* <Return> */
160 /* FreeType error code. 0 means success. */
161 /* */
162 FT_EXPORT_DEF( FT_Error ) FT_Set_MM_Blend_Coordinates(
163 FT_Face face,
164 FT_UInt num_coords,
165 FT_Fixed* coords );
166
167
168#ifdef __cplusplus
169 }
170#endif
171
172#endif /* FTMM_H */
173
174
175/* END */