modules/freetype2/include/ftmac.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial