vrshoot

diff libs/ft2static/freetype/ftmac.h @ 0:b2f14e535253

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 01 Feb 2014 19:58:19 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libs/ft2static/freetype/ftmac.h	Sat Feb 01 19:58:19 2014 +0200
     1.3 @@ -0,0 +1,274 @@
     1.4 +/***************************************************************************/
     1.5 +/*                                                                         */
     1.6 +/*  ftmac.h                                                                */
     1.7 +/*                                                                         */
     1.8 +/*    Additional Mac-specific API.                                         */
     1.9 +/*                                                                         */
    1.10 +/*  Copyright 1996-2001, 2004, 2006, 2007 by                               */
    1.11 +/*  Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg.     */
    1.12 +/*                                                                         */
    1.13 +/*  This file is part of the FreeType project, and may only be used,       */
    1.14 +/*  modified, and distributed under the terms of the FreeType project      */
    1.15 +/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
    1.16 +/*  this file you indicate that you have read the license and              */
    1.17 +/*  understand and accept it fully.                                        */
    1.18 +/*                                                                         */
    1.19 +/***************************************************************************/
    1.20 +
    1.21 +
    1.22 +/***************************************************************************/
    1.23 +/*                                                                         */
    1.24 +/* NOTE: Include this file after <freetype/freetype.h> and after any       */
    1.25 +/*       Mac-specific headers (because this header uses Mac types such as  */
    1.26 +/*       Handle, FSSpec, FSRef, etc.)                                      */
    1.27 +/*                                                                         */
    1.28 +/***************************************************************************/
    1.29 +
    1.30 +
    1.31 +#ifndef __FTMAC_H__
    1.32 +#define __FTMAC_H__
    1.33 +
    1.34 +
    1.35 +#include <ft2build.h>
    1.36 +
    1.37 +
    1.38 +FT_BEGIN_HEADER
    1.39 +
    1.40 +
    1.41 +/* gcc-3.4.1 and later can warn about functions tagged as deprecated */
    1.42 +#ifndef FT_DEPRECATED_ATTRIBUTE
    1.43 +#if defined(__GNUC__)                                               && \
    1.44 +    ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
    1.45 +#define FT_DEPRECATED_ATTRIBUTE  __attribute__((deprecated))
    1.46 +#else
    1.47 +#define FT_DEPRECATED_ATTRIBUTE
    1.48 +#endif
    1.49 +#endif
    1.50 +
    1.51 +
    1.52 +  /*************************************************************************/
    1.53 +  /*                                                                       */
    1.54 +  /* <Section>                                                             */
    1.55 +  /*    mac_specific                                                       */
    1.56 +  /*                                                                       */
    1.57 +  /* <Title>                                                               */
    1.58 +  /*    Mac Specific Interface                                             */
    1.59 +  /*                                                                       */
    1.60 +  /* <Abstract>                                                            */
    1.61 +  /*    Only available on the Macintosh.                                   */
    1.62 +  /*                                                                       */
    1.63 +  /* <Description>                                                         */
    1.64 +  /*    The following definitions are only available if FreeType is        */
    1.65 +  /*    compiled on a Macintosh.                                           */
    1.66 +  /*                                                                       */
    1.67 +  /*************************************************************************/
    1.68 +
    1.69 +
    1.70 +  /*************************************************************************/
    1.71 +  /*                                                                       */
    1.72 +  /* <Function>                                                            */
    1.73 +  /*    FT_New_Face_From_FOND                                              */
    1.74 +  /*                                                                       */
    1.75 +  /* <Description>                                                         */
    1.76 +  /*    Create a new face object from a FOND resource.                     */
    1.77 +  /*                                                                       */
    1.78 +  /* <InOut>                                                               */
    1.79 +  /*    library    :: A handle to the library resource.                    */
    1.80 +  /*                                                                       */
    1.81 +  /* <Input>                                                               */
    1.82 +  /*    fond       :: A FOND resource.                                     */
    1.83 +  /*                                                                       */
    1.84 +  /*    face_index :: Only supported for the -1 `sanity check' special     */
    1.85 +  /*                  case.                                                */
    1.86 +  /*                                                                       */
    1.87 +  /* <Output>                                                              */
    1.88 +  /*    aface      :: A handle to a new face object.                       */
    1.89 +  /*                                                                       */
    1.90 +  /* <Return>                                                              */
    1.91 +  /*    FreeType error code.  0~means success.                             */
    1.92 +  /*                                                                       */
    1.93 +  /* <Notes>                                                               */
    1.94 +  /*    This function can be used to create @FT_Face objects from fonts    */
    1.95 +  /*    that are installed in the system as follows.                       */
    1.96 +  /*                                                                       */
    1.97 +  /*    {                                                                  */
    1.98 +  /*      fond = GetResource( 'FOND', fontName );                          */
    1.99 +  /*      error = FT_New_Face_From_FOND( library, fond, 0, &face );        */
   1.100 +  /*    }                                                                  */
   1.101 +  /*                                                                       */
   1.102 +  FT_EXPORT( FT_Error )
   1.103 +  FT_New_Face_From_FOND( FT_Library  library,
   1.104 +                         Handle      fond,
   1.105 +                         FT_Long     face_index,
   1.106 +                         FT_Face    *aface )
   1.107 +                       FT_DEPRECATED_ATTRIBUTE;
   1.108 +
   1.109 +
   1.110 +  /*************************************************************************/
   1.111 +  /*                                                                       */
   1.112 +  /* <Function>                                                            */
   1.113 +  /*    FT_GetFile_From_Mac_Name                                           */
   1.114 +  /*                                                                       */
   1.115 +  /* <Description>                                                         */
   1.116 +  /*    Return an FSSpec for the disk file containing the named font.      */
   1.117 +  /*                                                                       */
   1.118 +  /* <Input>                                                               */
   1.119 +  /*    fontName   :: Mac OS name of the font (e.g., Times New Roman       */
   1.120 +  /*                  Bold).                                               */
   1.121 +  /*                                                                       */
   1.122 +  /* <Output>                                                              */
   1.123 +  /*    pathSpec   :: FSSpec to the file.  For passing to                  */
   1.124 +  /*                  @FT_New_Face_From_FSSpec.                            */
   1.125 +  /*                                                                       */
   1.126 +  /*    face_index :: Index of the face.  For passing to                   */
   1.127 +  /*                  @FT_New_Face_From_FSSpec.                            */
   1.128 +  /*                                                                       */
   1.129 +  /* <Return>                                                              */
   1.130 +  /*    FreeType error code.  0~means success.                             */
   1.131 +  /*                                                                       */
   1.132 +  FT_EXPORT( FT_Error )
   1.133 +  FT_GetFile_From_Mac_Name( const char*  fontName,
   1.134 +                            FSSpec*      pathSpec,
   1.135 +                            FT_Long*     face_index )
   1.136 +                          FT_DEPRECATED_ATTRIBUTE;
   1.137 +
   1.138 +
   1.139 +  /*************************************************************************/
   1.140 +  /*                                                                       */
   1.141 +  /* <Function>                                                            */
   1.142 +  /*    FT_GetFile_From_Mac_ATS_Name                                       */
   1.143 +  /*                                                                       */
   1.144 +  /* <Description>                                                         */
   1.145 +  /*    Return an FSSpec for the disk file containing the named font.      */
   1.146 +  /*                                                                       */
   1.147 +  /* <Input>                                                               */
   1.148 +  /*    fontName   :: Mac OS name of the font in ATS framework.            */
   1.149 +  /*                                                                       */
   1.150 +  /* <Output>                                                              */
   1.151 +  /*    pathSpec   :: FSSpec to the file. For passing to                   */
   1.152 +  /*                  @FT_New_Face_From_FSSpec.                            */
   1.153 +  /*                                                                       */
   1.154 +  /*    face_index :: Index of the face. For passing to                    */
   1.155 +  /*                  @FT_New_Face_From_FSSpec.                            */
   1.156 +  /*                                                                       */
   1.157 +  /* <Return>                                                              */
   1.158 +  /*    FreeType error code.  0~means success.                             */
   1.159 +  /*                                                                       */
   1.160 +  FT_EXPORT( FT_Error )
   1.161 +  FT_GetFile_From_Mac_ATS_Name( const char*  fontName,
   1.162 +                                FSSpec*      pathSpec,
   1.163 +                                FT_Long*     face_index )
   1.164 +                              FT_DEPRECATED_ATTRIBUTE;
   1.165 +
   1.166 +
   1.167 +  /*************************************************************************/
   1.168 +  /*                                                                       */
   1.169 +  /* <Function>                                                            */
   1.170 +  /*    FT_GetFilePath_From_Mac_ATS_Name                                   */
   1.171 +  /*                                                                       */
   1.172 +  /* <Description>                                                         */
   1.173 +  /*    Return a pathname of the disk file and face index for given font   */
   1.174 +  /*    name which is handled by ATS framework.                            */
   1.175 +  /*                                                                       */
   1.176 +  /* <Input>                                                               */
   1.177 +  /*    fontName    :: Mac OS name of the font in ATS framework.           */
   1.178 +  /*                                                                       */
   1.179 +  /* <Output>                                                              */
   1.180 +  /*    path        :: Buffer to store pathname of the file.  For passing  */
   1.181 +  /*                   to @FT_New_Face.  The client must allocate this     */
   1.182 +  /*                   buffer before calling this function.                */
   1.183 +  /*                                                                       */
   1.184 +  /*    maxPathSize :: Lengths of the buffer `path' that client allocated. */
   1.185 +  /*                                                                       */
   1.186 +  /*    face_index  :: Index of the face.  For passing to @FT_New_Face.    */
   1.187 +  /*                                                                       */
   1.188 +  /* <Return>                                                              */
   1.189 +  /*    FreeType error code.  0~means success.                             */
   1.190 +  /*                                                                       */
   1.191 +  FT_EXPORT( FT_Error )
   1.192 +  FT_GetFilePath_From_Mac_ATS_Name( const char*  fontName,
   1.193 +                                    UInt8*       path,
   1.194 +                                    UInt32       maxPathSize,
   1.195 +                                    FT_Long*     face_index )
   1.196 +                                  FT_DEPRECATED_ATTRIBUTE;
   1.197 +
   1.198 +
   1.199 +  /*************************************************************************/
   1.200 +  /*                                                                       */
   1.201 +  /* <Function>                                                            */
   1.202 +  /*    FT_New_Face_From_FSSpec                                            */
   1.203 +  /*                                                                       */
   1.204 +  /* <Description>                                                         */
   1.205 +  /*    Create a new face object from a given resource and typeface index  */
   1.206 +  /*    using an FSSpec to the font file.                                  */
   1.207 +  /*                                                                       */
   1.208 +  /* <InOut>                                                               */
   1.209 +  /*    library    :: A handle to the library resource.                    */
   1.210 +  /*                                                                       */
   1.211 +  /* <Input>                                                               */
   1.212 +  /*    spec       :: FSSpec to the font file.                             */
   1.213 +  /*                                                                       */
   1.214 +  /*    face_index :: The index of the face within the resource.  The      */
   1.215 +  /*                  first face has index~0.                              */
   1.216 +  /* <Output>                                                              */
   1.217 +  /*    aface      :: A handle to a new face object.                       */
   1.218 +  /*                                                                       */
   1.219 +  /* <Return>                                                              */
   1.220 +  /*    FreeType error code.  0~means success.                             */
   1.221 +  /*                                                                       */
   1.222 +  /* <Note>                                                                */
   1.223 +  /*    @FT_New_Face_From_FSSpec is identical to @FT_New_Face except       */
   1.224 +  /*    it accepts an FSSpec instead of a path.                            */
   1.225 +  /*                                                                       */
   1.226 +  FT_EXPORT( FT_Error )
   1.227 +  FT_New_Face_From_FSSpec( FT_Library     library,
   1.228 +                           const FSSpec  *spec,
   1.229 +                           FT_Long        face_index,
   1.230 +                           FT_Face       *aface )
   1.231 +                         FT_DEPRECATED_ATTRIBUTE;
   1.232 +
   1.233 +
   1.234 +  /*************************************************************************/
   1.235 +  /*                                                                       */
   1.236 +  /* <Function>                                                            */
   1.237 +  /*    FT_New_Face_From_FSRef                                             */
   1.238 +  /*                                                                       */
   1.239 +  /* <Description>                                                         */
   1.240 +  /*    Create a new face object from a given resource and typeface index  */
   1.241 +  /*    using an FSRef to the font file.                                   */
   1.242 +  /*                                                                       */
   1.243 +  /* <InOut>                                                               */
   1.244 +  /*    library    :: A handle to the library resource.                    */
   1.245 +  /*                                                                       */
   1.246 +  /* <Input>                                                               */
   1.247 +  /*    spec       :: FSRef to the font file.                              */
   1.248 +  /*                                                                       */
   1.249 +  /*    face_index :: The index of the face within the resource.  The      */
   1.250 +  /*                  first face has index~0.                              */
   1.251 +  /* <Output>                                                              */
   1.252 +  /*    aface      :: A handle to a new face object.                       */
   1.253 +  /*                                                                       */
   1.254 +  /* <Return>                                                              */
   1.255 +  /*    FreeType error code.  0~means success.                             */
   1.256 +  /*                                                                       */
   1.257 +  /* <Note>                                                                */
   1.258 +  /*    @FT_New_Face_From_FSRef is identical to @FT_New_Face except        */
   1.259 +  /*    it accepts an FSRef instead of a path.                             */
   1.260 +  /*                                                                       */
   1.261 +  FT_EXPORT( FT_Error )
   1.262 +  FT_New_Face_From_FSRef( FT_Library    library,
   1.263 +                          const FSRef  *ref,
   1.264 +                          FT_Long       face_index,
   1.265 +                          FT_Face      *aface )
   1.266 +                        FT_DEPRECATED_ATTRIBUTE;
   1.267 +
   1.268 +  /* */
   1.269 +
   1.270 +
   1.271 +FT_END_HEADER
   1.272 +
   1.273 +
   1.274 +#endif /* __FTMAC_H__ */
   1.275 +
   1.276 +
   1.277 +/* END */