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