rev |
line source |
nuclear@0
|
1 /***************************************************************************/
|
nuclear@0
|
2 /* */
|
nuclear@0
|
3 /* ftmac.h */
|
nuclear@0
|
4 /* */
|
nuclear@0
|
5 /* Additional Mac-specific API. */
|
nuclear@0
|
6 /* */
|
nuclear@0
|
7 /* Copyright 1996-2001, 2004, 2006, 2007 by */
|
nuclear@0
|
8 /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
|
nuclear@0
|
9 /* */
|
nuclear@0
|
10 /* This file is part of the FreeType project, and may only be used, */
|
nuclear@0
|
11 /* modified, and distributed under the terms of the FreeType project */
|
nuclear@0
|
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
nuclear@0
|
13 /* this file you indicate that you have read the license and */
|
nuclear@0
|
14 /* understand and accept it fully. */
|
nuclear@0
|
15 /* */
|
nuclear@0
|
16 /***************************************************************************/
|
nuclear@0
|
17
|
nuclear@0
|
18
|
nuclear@0
|
19 /***************************************************************************/
|
nuclear@0
|
20 /* */
|
nuclear@0
|
21 /* NOTE: Include this file after <freetype/freetype.h> and after any */
|
nuclear@0
|
22 /* Mac-specific headers (because this header uses Mac types such as */
|
nuclear@0
|
23 /* Handle, FSSpec, FSRef, etc.) */
|
nuclear@0
|
24 /* */
|
nuclear@0
|
25 /***************************************************************************/
|
nuclear@0
|
26
|
nuclear@0
|
27
|
nuclear@0
|
28 #ifndef __FTMAC_H__
|
nuclear@0
|
29 #define __FTMAC_H__
|
nuclear@0
|
30
|
nuclear@0
|
31
|
nuclear@0
|
32 #include <ft2build.h>
|
nuclear@0
|
33
|
nuclear@0
|
34
|
nuclear@0
|
35 FT_BEGIN_HEADER
|
nuclear@0
|
36
|
nuclear@0
|
37
|
nuclear@0
|
38 /* gcc-3.4.1 and later can warn about functions tagged as deprecated */
|
nuclear@0
|
39 #ifndef FT_DEPRECATED_ATTRIBUTE
|
nuclear@0
|
40 #if defined(__GNUC__) && \
|
nuclear@0
|
41 ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
|
nuclear@0
|
42 #define FT_DEPRECATED_ATTRIBUTE __attribute__((deprecated))
|
nuclear@0
|
43 #else
|
nuclear@0
|
44 #define FT_DEPRECATED_ATTRIBUTE
|
nuclear@0
|
45 #endif
|
nuclear@0
|
46 #endif
|
nuclear@0
|
47
|
nuclear@0
|
48
|
nuclear@0
|
49 /*************************************************************************/
|
nuclear@0
|
50 /* */
|
nuclear@0
|
51 /* <Section> */
|
nuclear@0
|
52 /* mac_specific */
|
nuclear@0
|
53 /* */
|
nuclear@0
|
54 /* <Title> */
|
nuclear@0
|
55 /* Mac Specific Interface */
|
nuclear@0
|
56 /* */
|
nuclear@0
|
57 /* <Abstract> */
|
nuclear@0
|
58 /* Only available on the Macintosh. */
|
nuclear@0
|
59 /* */
|
nuclear@0
|
60 /* <Description> */
|
nuclear@0
|
61 /* The following definitions are only available if FreeType is */
|
nuclear@0
|
62 /* compiled on a Macintosh. */
|
nuclear@0
|
63 /* */
|
nuclear@0
|
64 /*************************************************************************/
|
nuclear@0
|
65
|
nuclear@0
|
66
|
nuclear@0
|
67 /*************************************************************************/
|
nuclear@0
|
68 /* */
|
nuclear@0
|
69 /* <Function> */
|
nuclear@0
|
70 /* FT_New_Face_From_FOND */
|
nuclear@0
|
71 /* */
|
nuclear@0
|
72 /* <Description> */
|
nuclear@0
|
73 /* Create a new face object from a FOND resource. */
|
nuclear@0
|
74 /* */
|
nuclear@0
|
75 /* <InOut> */
|
nuclear@0
|
76 /* library :: A handle to the library resource. */
|
nuclear@0
|
77 /* */
|
nuclear@0
|
78 /* <Input> */
|
nuclear@0
|
79 /* fond :: A FOND resource. */
|
nuclear@0
|
80 /* */
|
nuclear@0
|
81 /* face_index :: Only supported for the -1 `sanity check' special */
|
nuclear@0
|
82 /* case. */
|
nuclear@0
|
83 /* */
|
nuclear@0
|
84 /* <Output> */
|
nuclear@0
|
85 /* aface :: A handle to a new face object. */
|
nuclear@0
|
86 /* */
|
nuclear@0
|
87 /* <Return> */
|
nuclear@0
|
88 /* FreeType error code. 0~means success. */
|
nuclear@0
|
89 /* */
|
nuclear@0
|
90 /* <Notes> */
|
nuclear@0
|
91 /* This function can be used to create @FT_Face objects from fonts */
|
nuclear@0
|
92 /* that are installed in the system as follows. */
|
nuclear@0
|
93 /* */
|
nuclear@0
|
94 /* { */
|
nuclear@0
|
95 /* fond = GetResource( 'FOND', fontName ); */
|
nuclear@0
|
96 /* error = FT_New_Face_From_FOND( library, fond, 0, &face ); */
|
nuclear@0
|
97 /* } */
|
nuclear@0
|
98 /* */
|
nuclear@0
|
99 FT_EXPORT( FT_Error )
|
nuclear@0
|
100 FT_New_Face_From_FOND( FT_Library library,
|
nuclear@0
|
101 Handle fond,
|
nuclear@0
|
102 FT_Long face_index,
|
nuclear@0
|
103 FT_Face *aface )
|
nuclear@0
|
104 FT_DEPRECATED_ATTRIBUTE;
|
nuclear@0
|
105
|
nuclear@0
|
106
|
nuclear@0
|
107 /*************************************************************************/
|
nuclear@0
|
108 /* */
|
nuclear@0
|
109 /* <Function> */
|
nuclear@0
|
110 /* FT_GetFile_From_Mac_Name */
|
nuclear@0
|
111 /* */
|
nuclear@0
|
112 /* <Description> */
|
nuclear@0
|
113 /* Return an FSSpec for the disk file containing the named font. */
|
nuclear@0
|
114 /* */
|
nuclear@0
|
115 /* <Input> */
|
nuclear@0
|
116 /* fontName :: Mac OS name of the font (e.g., Times New Roman */
|
nuclear@0
|
117 /* Bold). */
|
nuclear@0
|
118 /* */
|
nuclear@0
|
119 /* <Output> */
|
nuclear@0
|
120 /* pathSpec :: FSSpec to the file. For passing to */
|
nuclear@0
|
121 /* @FT_New_Face_From_FSSpec. */
|
nuclear@0
|
122 /* */
|
nuclear@0
|
123 /* face_index :: Index of the face. For passing to */
|
nuclear@0
|
124 /* @FT_New_Face_From_FSSpec. */
|
nuclear@0
|
125 /* */
|
nuclear@0
|
126 /* <Return> */
|
nuclear@0
|
127 /* FreeType error code. 0~means success. */
|
nuclear@0
|
128 /* */
|
nuclear@0
|
129 FT_EXPORT( FT_Error )
|
nuclear@0
|
130 FT_GetFile_From_Mac_Name( const char* fontName,
|
nuclear@0
|
131 FSSpec* pathSpec,
|
nuclear@0
|
132 FT_Long* face_index )
|
nuclear@0
|
133 FT_DEPRECATED_ATTRIBUTE;
|
nuclear@0
|
134
|
nuclear@0
|
135
|
nuclear@0
|
136 /*************************************************************************/
|
nuclear@0
|
137 /* */
|
nuclear@0
|
138 /* <Function> */
|
nuclear@0
|
139 /* FT_GetFile_From_Mac_ATS_Name */
|
nuclear@0
|
140 /* */
|
nuclear@0
|
141 /* <Description> */
|
nuclear@0
|
142 /* Return an FSSpec for the disk file containing the named font. */
|
nuclear@0
|
143 /* */
|
nuclear@0
|
144 /* <Input> */
|
nuclear@0
|
145 /* fontName :: Mac OS name of the font in ATS framework. */
|
nuclear@0
|
146 /* */
|
nuclear@0
|
147 /* <Output> */
|
nuclear@0
|
148 /* pathSpec :: FSSpec to the file. For passing to */
|
nuclear@0
|
149 /* @FT_New_Face_From_FSSpec. */
|
nuclear@0
|
150 /* */
|
nuclear@0
|
151 /* face_index :: Index of the face. For passing to */
|
nuclear@0
|
152 /* @FT_New_Face_From_FSSpec. */
|
nuclear@0
|
153 /* */
|
nuclear@0
|
154 /* <Return> */
|
nuclear@0
|
155 /* FreeType error code. 0~means success. */
|
nuclear@0
|
156 /* */
|
nuclear@0
|
157 FT_EXPORT( FT_Error )
|
nuclear@0
|
158 FT_GetFile_From_Mac_ATS_Name( const char* fontName,
|
nuclear@0
|
159 FSSpec* pathSpec,
|
nuclear@0
|
160 FT_Long* face_index )
|
nuclear@0
|
161 FT_DEPRECATED_ATTRIBUTE;
|
nuclear@0
|
162
|
nuclear@0
|
163
|
nuclear@0
|
164 /*************************************************************************/
|
nuclear@0
|
165 /* */
|
nuclear@0
|
166 /* <Function> */
|
nuclear@0
|
167 /* FT_GetFilePath_From_Mac_ATS_Name */
|
nuclear@0
|
168 /* */
|
nuclear@0
|
169 /* <Description> */
|
nuclear@0
|
170 /* Return a pathname of the disk file and face index for given font */
|
nuclear@0
|
171 /* name which is handled by ATS framework. */
|
nuclear@0
|
172 /* */
|
nuclear@0
|
173 /* <Input> */
|
nuclear@0
|
174 /* fontName :: Mac OS name of the font in ATS framework. */
|
nuclear@0
|
175 /* */
|
nuclear@0
|
176 /* <Output> */
|
nuclear@0
|
177 /* path :: Buffer to store pathname of the file. For passing */
|
nuclear@0
|
178 /* to @FT_New_Face. The client must allocate this */
|
nuclear@0
|
179 /* buffer before calling this function. */
|
nuclear@0
|
180 /* */
|
nuclear@0
|
181 /* maxPathSize :: Lengths of the buffer `path' that client allocated. */
|
nuclear@0
|
182 /* */
|
nuclear@0
|
183 /* face_index :: Index of the face. For passing to @FT_New_Face. */
|
nuclear@0
|
184 /* */
|
nuclear@0
|
185 /* <Return> */
|
nuclear@0
|
186 /* FreeType error code. 0~means success. */
|
nuclear@0
|
187 /* */
|
nuclear@0
|
188 FT_EXPORT( FT_Error )
|
nuclear@0
|
189 FT_GetFilePath_From_Mac_ATS_Name( const char* fontName,
|
nuclear@0
|
190 UInt8* path,
|
nuclear@0
|
191 UInt32 maxPathSize,
|
nuclear@0
|
192 FT_Long* face_index )
|
nuclear@0
|
193 FT_DEPRECATED_ATTRIBUTE;
|
nuclear@0
|
194
|
nuclear@0
|
195
|
nuclear@0
|
196 /*************************************************************************/
|
nuclear@0
|
197 /* */
|
nuclear@0
|
198 /* <Function> */
|
nuclear@0
|
199 /* FT_New_Face_From_FSSpec */
|
nuclear@0
|
200 /* */
|
nuclear@0
|
201 /* <Description> */
|
nuclear@0
|
202 /* Create a new face object from a given resource and typeface index */
|
nuclear@0
|
203 /* using an FSSpec to the font file. */
|
nuclear@0
|
204 /* */
|
nuclear@0
|
205 /* <InOut> */
|
nuclear@0
|
206 /* library :: A handle to the library resource. */
|
nuclear@0
|
207 /* */
|
nuclear@0
|
208 /* <Input> */
|
nuclear@0
|
209 /* spec :: FSSpec to the font file. */
|
nuclear@0
|
210 /* */
|
nuclear@0
|
211 /* face_index :: The index of the face within the resource. The */
|
nuclear@0
|
212 /* first face has index~0. */
|
nuclear@0
|
213 /* <Output> */
|
nuclear@0
|
214 /* aface :: A handle to a new face object. */
|
nuclear@0
|
215 /* */
|
nuclear@0
|
216 /* <Return> */
|
nuclear@0
|
217 /* FreeType error code. 0~means success. */
|
nuclear@0
|
218 /* */
|
nuclear@0
|
219 /* <Note> */
|
nuclear@0
|
220 /* @FT_New_Face_From_FSSpec is identical to @FT_New_Face except */
|
nuclear@0
|
221 /* it accepts an FSSpec instead of a path. */
|
nuclear@0
|
222 /* */
|
nuclear@0
|
223 FT_EXPORT( FT_Error )
|
nuclear@0
|
224 FT_New_Face_From_FSSpec( FT_Library library,
|
nuclear@0
|
225 const FSSpec *spec,
|
nuclear@0
|
226 FT_Long face_index,
|
nuclear@0
|
227 FT_Face *aface )
|
nuclear@0
|
228 FT_DEPRECATED_ATTRIBUTE;
|
nuclear@0
|
229
|
nuclear@0
|
230
|
nuclear@0
|
231 /*************************************************************************/
|
nuclear@0
|
232 /* */
|
nuclear@0
|
233 /* <Function> */
|
nuclear@0
|
234 /* FT_New_Face_From_FSRef */
|
nuclear@0
|
235 /* */
|
nuclear@0
|
236 /* <Description> */
|
nuclear@0
|
237 /* Create a new face object from a given resource and typeface index */
|
nuclear@0
|
238 /* using an FSRef to the font file. */
|
nuclear@0
|
239 /* */
|
nuclear@0
|
240 /* <InOut> */
|
nuclear@0
|
241 /* library :: A handle to the library resource. */
|
nuclear@0
|
242 /* */
|
nuclear@0
|
243 /* <Input> */
|
nuclear@0
|
244 /* spec :: FSRef to the font file. */
|
nuclear@0
|
245 /* */
|
nuclear@0
|
246 /* face_index :: The index of the face within the resource. The */
|
nuclear@0
|
247 /* first face has index~0. */
|
nuclear@0
|
248 /* <Output> */
|
nuclear@0
|
249 /* aface :: A handle to a new face object. */
|
nuclear@0
|
250 /* */
|
nuclear@0
|
251 /* <Return> */
|
nuclear@0
|
252 /* FreeType error code. 0~means success. */
|
nuclear@0
|
253 /* */
|
nuclear@0
|
254 /* <Note> */
|
nuclear@0
|
255 /* @FT_New_Face_From_FSRef is identical to @FT_New_Face except */
|
nuclear@0
|
256 /* it accepts an FSRef instead of a path. */
|
nuclear@0
|
257 /* */
|
nuclear@0
|
258 FT_EXPORT( FT_Error )
|
nuclear@0
|
259 FT_New_Face_From_FSRef( FT_Library library,
|
nuclear@0
|
260 const FSRef *ref,
|
nuclear@0
|
261 FT_Long face_index,
|
nuclear@0
|
262 FT_Face *aface )
|
nuclear@0
|
263 FT_DEPRECATED_ATTRIBUTE;
|
nuclear@0
|
264
|
nuclear@0
|
265 /* */
|
nuclear@0
|
266
|
nuclear@0
|
267
|
nuclear@0
|
268 FT_END_HEADER
|
nuclear@0
|
269
|
nuclear@0
|
270
|
nuclear@0
|
271 #endif /* __FTMAC_H__ */
|
nuclear@0
|
272
|
nuclear@0
|
273
|
nuclear@0
|
274 /* END */
|