vrshoot

diff libs/ft2static/freetype/ftbdf.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/ftbdf.h	Sat Feb 01 19:58:19 2014 +0200
     1.3 @@ -0,0 +1,209 @@
     1.4 +/***************************************************************************/
     1.5 +/*                                                                         */
     1.6 +/*  ftbdf.h                                                                */
     1.7 +/*                                                                         */
     1.8 +/*    FreeType API for accessing BDF-specific strings (specification).     */
     1.9 +/*                                                                         */
    1.10 +/*  Copyright 2002, 2003, 2004, 2006, 2009 by                              */
    1.11 +/*  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 +#ifndef __FTBDF_H__
    1.23 +#define __FTBDF_H__
    1.24 +
    1.25 +#include <ft2build.h>
    1.26 +#include FT_FREETYPE_H
    1.27 +
    1.28 +#ifdef FREETYPE_H
    1.29 +#error "freetype.h of FreeType 1 has been loaded!"
    1.30 +#error "Please fix the directory search order for header files"
    1.31 +#error "so that freetype.h of FreeType 2 is found first."
    1.32 +#endif
    1.33 +
    1.34 +
    1.35 +FT_BEGIN_HEADER
    1.36 +
    1.37 +
    1.38 +  /*************************************************************************/
    1.39 +  /*                                                                       */
    1.40 +  /* <Section>                                                             */
    1.41 +  /*    bdf_fonts                                                          */
    1.42 +  /*                                                                       */
    1.43 +  /* <Title>                                                               */
    1.44 +  /*    BDF and PCF Files                                                  */
    1.45 +  /*                                                                       */
    1.46 +  /* <Abstract>                                                            */
    1.47 +  /*    BDF and PCF specific API.                                          */
    1.48 +  /*                                                                       */
    1.49 +  /* <Description>                                                         */
    1.50 +  /*    This section contains the declaration of functions specific to BDF */
    1.51 +  /*    and PCF fonts.                                                     */
    1.52 +  /*                                                                       */
    1.53 +  /*************************************************************************/
    1.54 +
    1.55 +
    1.56 +  /**********************************************************************
    1.57 +   *
    1.58 +   * @enum:
    1.59 +   *    FT_PropertyType
    1.60 +   *
    1.61 +   * @description:
    1.62 +   *    A list of BDF property types.
    1.63 +   *
    1.64 +   * @values:
    1.65 +   *    BDF_PROPERTY_TYPE_NONE ::
    1.66 +   *      Value~0 is used to indicate a missing property.
    1.67 +   *
    1.68 +   *    BDF_PROPERTY_TYPE_ATOM ::
    1.69 +   *      Property is a string atom.
    1.70 +   *
    1.71 +   *    BDF_PROPERTY_TYPE_INTEGER ::
    1.72 +   *      Property is a 32-bit signed integer.
    1.73 +   *
    1.74 +   *    BDF_PROPERTY_TYPE_CARDINAL ::
    1.75 +   *      Property is a 32-bit unsigned integer.
    1.76 +   */
    1.77 +  typedef enum  BDF_PropertyType_
    1.78 +  {
    1.79 +    BDF_PROPERTY_TYPE_NONE     = 0,
    1.80 +    BDF_PROPERTY_TYPE_ATOM     = 1,
    1.81 +    BDF_PROPERTY_TYPE_INTEGER  = 2,
    1.82 +    BDF_PROPERTY_TYPE_CARDINAL = 3
    1.83 +
    1.84 +  } BDF_PropertyType;
    1.85 +
    1.86 +
    1.87 +  /**********************************************************************
    1.88 +   *
    1.89 +   * @type:
    1.90 +   *    BDF_Property
    1.91 +   *
    1.92 +   * @description:
    1.93 +   *    A handle to a @BDF_PropertyRec structure to model a given
    1.94 +   *    BDF/PCF property.
    1.95 +   */
    1.96 +  typedef struct BDF_PropertyRec_*  BDF_Property;
    1.97 +
    1.98 +
    1.99 + /**********************************************************************
   1.100 +  *
   1.101 +  * @struct:
   1.102 +  *    BDF_PropertyRec
   1.103 +  *
   1.104 +  * @description:
   1.105 +  *    This structure models a given BDF/PCF property.
   1.106 +  *
   1.107 +  * @fields:
   1.108 +  *    type ::
   1.109 +  *      The property type.
   1.110 +  *
   1.111 +  *    u.atom ::
   1.112 +  *      The atom string, if type is @BDF_PROPERTY_TYPE_ATOM.
   1.113 +  *
   1.114 +  *    u.integer ::
   1.115 +  *      A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.
   1.116 +  *
   1.117 +  *    u.cardinal ::
   1.118 +  *      An unsigned integer, if type is @BDF_PROPERTY_TYPE_CARDINAL.
   1.119 +  */
   1.120 +  typedef struct  BDF_PropertyRec_
   1.121 +  {
   1.122 +    BDF_PropertyType  type;
   1.123 +    union {
   1.124 +      const char*     atom;
   1.125 +      FT_Int32        integer;
   1.126 +      FT_UInt32       cardinal;
   1.127 +
   1.128 +    } u;
   1.129 +
   1.130 +  } BDF_PropertyRec;
   1.131 +
   1.132 +
   1.133 + /**********************************************************************
   1.134 +  *
   1.135 +  * @function:
   1.136 +  *    FT_Get_BDF_Charset_ID
   1.137 +  *
   1.138 +  * @description:
   1.139 +  *    Retrieve a BDF font character set identity, according to
   1.140 +  *    the BDF specification.
   1.141 +  *
   1.142 +  * @input:
   1.143 +  *    face ::
   1.144 +  *       A handle to the input face.
   1.145 +  *
   1.146 +  * @output:
   1.147 +  *    acharset_encoding ::
   1.148 +  *       Charset encoding, as a C~string, owned by the face.
   1.149 +  *
   1.150 +  *    acharset_registry ::
   1.151 +  *       Charset registry, as a C~string, owned by the face.
   1.152 +  *
   1.153 +  * @return:
   1.154 +  *   FreeType error code.  0~means success.
   1.155 +  *
   1.156 +  * @note:
   1.157 +  *   This function only works with BDF faces, returning an error otherwise.
   1.158 +  */
   1.159 +  FT_EXPORT( FT_Error )
   1.160 +  FT_Get_BDF_Charset_ID( FT_Face       face,
   1.161 +                         const char*  *acharset_encoding,
   1.162 +                         const char*  *acharset_registry );
   1.163 +
   1.164 +
   1.165 + /**********************************************************************
   1.166 +  *
   1.167 +  * @function:
   1.168 +  *    FT_Get_BDF_Property
   1.169 +  *
   1.170 +  * @description:
   1.171 +  *    Retrieve a BDF property from a BDF or PCF font file.
   1.172 +  *
   1.173 +  * @input:
   1.174 +  *    face :: A handle to the input face.
   1.175 +  *
   1.176 +  *    name :: The property name.
   1.177 +  *
   1.178 +  * @output:
   1.179 +  *    aproperty :: The property.
   1.180 +  *
   1.181 +  * @return:
   1.182 +  *   FreeType error code.  0~means success.
   1.183 +  *
   1.184 +  * @note:
   1.185 +  *   This function works with BDF _and_ PCF fonts.  It returns an error
   1.186 +  *   otherwise.  It also returns an error if the property is not in the
   1.187 +  *   font.
   1.188 +  *
   1.189 +  *   A `property' is a either key-value pair within the STARTPROPERTIES
   1.190 +  *   ... ENDPROPERTIES block of a BDF font or a key-value pair from the
   1.191 +  *   `info->props' array within a `FontRec' structure of a PCF font.
   1.192 +  *
   1.193 +  *   Integer properties are always stored as `signed' within PCF fonts;
   1.194 +  *   consequently, @BDF_PROPERTY_TYPE_CARDINAL is a possible return value
   1.195 +  *   for BDF fonts only.
   1.196 +  *
   1.197 +  *   In case of error, `aproperty->type' is always set to
   1.198 +  *   @BDF_PROPERTY_TYPE_NONE.
   1.199 +  */
   1.200 +  FT_EXPORT( FT_Error )
   1.201 +  FT_Get_BDF_Property( FT_Face           face,
   1.202 +                       const char*       prop_name,
   1.203 +                       BDF_PropertyRec  *aproperty );
   1.204 +
   1.205 + /* */
   1.206 +
   1.207 +FT_END_HEADER
   1.208 +
   1.209 +#endif /* __FTBDF_H__ */
   1.210 +
   1.211 +
   1.212 +/* END */