vrshoot

diff libs/ft2static/freetype/ftwinfnt.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/ftwinfnt.h	Sat Feb 01 19:58:19 2014 +0200
     1.3 @@ -0,0 +1,274 @@
     1.4 +/***************************************************************************/
     1.5 +/*                                                                         */
     1.6 +/*  ftwinfnt.h                                                             */
     1.7 +/*                                                                         */
     1.8 +/*    FreeType API for accessing Windows fnt-specific data.                */
     1.9 +/*                                                                         */
    1.10 +/*  Copyright 2003, 2004, 2008 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 __FTWINFNT_H__
    1.23 +#define __FTWINFNT_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 +  /*    winfnt_fonts                                                       */
    1.42 +  /*                                                                       */
    1.43 +  /* <Title>                                                               */
    1.44 +  /*    Window FNT Files                                                   */
    1.45 +  /*                                                                       */
    1.46 +  /* <Abstract>                                                            */
    1.47 +  /*    Windows FNT specific API.                                          */
    1.48 +  /*                                                                       */
    1.49 +  /* <Description>                                                         */
    1.50 +  /*    This section contains the declaration of Windows FNT specific      */
    1.51 +  /*    functions.                                                         */
    1.52 +  /*                                                                       */
    1.53 +  /*************************************************************************/
    1.54 +
    1.55 +
    1.56 +  /*************************************************************************
    1.57 +   *
    1.58 +   * @enum:
    1.59 +   *   FT_WinFNT_ID_XXX
    1.60 +   *
    1.61 +   * @description:
    1.62 +   *   A list of valid values for the `charset' byte in
    1.63 +   *   @FT_WinFNT_HeaderRec.  Exact mapping tables for the various cpXXXX
    1.64 +   *   encodings (except for cp1361) can be found at ftp://ftp.unicode.org
    1.65 +   *   in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory.  cp1361 is
    1.66 +   *   roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
    1.67 +   *
    1.68 +   * @values:
    1.69 +   *   FT_WinFNT_ID_DEFAULT ::
    1.70 +   *     This is used for font enumeration and font creation as a
    1.71 +   *     `don't care' value.  Valid font files don't contain this value.
    1.72 +   *     When querying for information about the character set of the font
    1.73 +   *     that is currently selected into a specified device context, this
    1.74 +   *     return value (of the related Windows API) simply denotes failure.
    1.75 +   *
    1.76 +   *   FT_WinFNT_ID_SYMBOL ::
    1.77 +   *     There is no known mapping table available.
    1.78 +   *
    1.79 +   *   FT_WinFNT_ID_MAC ::
    1.80 +   *     Mac Roman encoding.
    1.81 +   *
    1.82 +   *   FT_WinFNT_ID_OEM ::
    1.83 +   *     From Michael Pöttgen <michael@poettgen.de>:
    1.84 +   *
    1.85 +   *       The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM
    1.86 +   *       is used for the charset of vector fonts, like `modern.fon',
    1.87 +   *       `roman.fon', and `script.fon' on Windows.
    1.88 +   *
    1.89 +   *       The `CreateFont' documentation says: The FT_WinFNT_ID_OEM value
    1.90 +   *       specifies a character set that is operating-system dependent.
    1.91 +   *
    1.92 +   *       The `IFIMETRICS' documentation from the `Windows Driver
    1.93 +   *       Development Kit' says: This font supports an OEM-specific
    1.94 +   *       character set.  The OEM character set is system dependent.
    1.95 +   *
    1.96 +   *       In general OEM, as opposed to ANSI (i.e., cp1252), denotes the
    1.97 +   *       second default codepage that most international versions of
    1.98 +   *       Windows have.  It is one of the OEM codepages from
    1.99 +   *
   1.100 +   *         http://www.microsoft.com/globaldev/reference/cphome.mspx,
   1.101 +   *
   1.102 +   *       and is used for the `DOS boxes', to support legacy applications.
   1.103 +   *       A German Windows version for example usually uses ANSI codepage
   1.104 +   *       1252 and OEM codepage 850.
   1.105 +   *
   1.106 +   *   FT_WinFNT_ID_CP874 ::
   1.107 +   *     A superset of Thai TIS 620 and ISO 8859-11.
   1.108 +   *
   1.109 +   *   FT_WinFNT_ID_CP932 ::
   1.110 +   *     A superset of Japanese Shift-JIS (with minor deviations).
   1.111 +   *
   1.112 +   *   FT_WinFNT_ID_CP936 ::
   1.113 +   *     A superset of simplified Chinese GB 2312-1980 (with different
   1.114 +   *     ordering and minor deviations).
   1.115 +   *
   1.116 +   *   FT_WinFNT_ID_CP949 ::
   1.117 +   *     A superset of Korean Hangul KS~C 5601-1987 (with different
   1.118 +   *     ordering and minor deviations).
   1.119 +   *
   1.120 +   *   FT_WinFNT_ID_CP950 ::
   1.121 +   *     A superset of traditional Chinese Big~5 ETen (with different
   1.122 +   *     ordering and minor deviations).
   1.123 +   *
   1.124 +   *   FT_WinFNT_ID_CP1250 ::
   1.125 +   *     A superset of East European ISO 8859-2 (with slightly different
   1.126 +   *     ordering).
   1.127 +   *
   1.128 +   *   FT_WinFNT_ID_CP1251 ::
   1.129 +   *     A superset of Russian ISO 8859-5 (with different ordering).
   1.130 +   *
   1.131 +   *   FT_WinFNT_ID_CP1252 ::
   1.132 +   *     ANSI encoding.  A superset of ISO 8859-1.
   1.133 +   *
   1.134 +   *   FT_WinFNT_ID_CP1253 ::
   1.135 +   *     A superset of Greek ISO 8859-7 (with minor modifications).
   1.136 +   *
   1.137 +   *   FT_WinFNT_ID_CP1254 ::
   1.138 +   *     A superset of Turkish ISO 8859-9.
   1.139 +   *
   1.140 +   *   FT_WinFNT_ID_CP1255 ::
   1.141 +   *     A superset of Hebrew ISO 8859-8 (with some modifications).
   1.142 +   *
   1.143 +   *   FT_WinFNT_ID_CP1256 ::
   1.144 +   *     A superset of Arabic ISO 8859-6 (with different ordering).
   1.145 +   *
   1.146 +   *   FT_WinFNT_ID_CP1257 ::
   1.147 +   *     A superset of Baltic ISO 8859-13 (with some deviations).
   1.148 +   *
   1.149 +   *   FT_WinFNT_ID_CP1258 ::
   1.150 +   *     For Vietnamese.  This encoding doesn't cover all necessary
   1.151 +   *     characters.
   1.152 +   *
   1.153 +   *   FT_WinFNT_ID_CP1361 ::
   1.154 +   *     Korean (Johab).
   1.155 +   */
   1.156 +
   1.157 +#define FT_WinFNT_ID_CP1252    0
   1.158 +#define FT_WinFNT_ID_DEFAULT   1
   1.159 +#define FT_WinFNT_ID_SYMBOL    2
   1.160 +#define FT_WinFNT_ID_MAC      77
   1.161 +#define FT_WinFNT_ID_CP932   128
   1.162 +#define FT_WinFNT_ID_CP949   129
   1.163 +#define FT_WinFNT_ID_CP1361  130
   1.164 +#define FT_WinFNT_ID_CP936   134
   1.165 +#define FT_WinFNT_ID_CP950   136
   1.166 +#define FT_WinFNT_ID_CP1253  161
   1.167 +#define FT_WinFNT_ID_CP1254  162
   1.168 +#define FT_WinFNT_ID_CP1258  163
   1.169 +#define FT_WinFNT_ID_CP1255  177
   1.170 +#define FT_WinFNT_ID_CP1256  178
   1.171 +#define FT_WinFNT_ID_CP1257  186
   1.172 +#define FT_WinFNT_ID_CP1251  204
   1.173 +#define FT_WinFNT_ID_CP874   222
   1.174 +#define FT_WinFNT_ID_CP1250  238
   1.175 +#define FT_WinFNT_ID_OEM     255
   1.176 +
   1.177 +
   1.178 +  /*************************************************************************/
   1.179 +  /*                                                                       */
   1.180 +  /* <Struct>                                                              */
   1.181 +  /*    FT_WinFNT_HeaderRec                                                */
   1.182 +  /*                                                                       */
   1.183 +  /* <Description>                                                         */
   1.184 +  /*    Windows FNT Header info.                                           */
   1.185 +  /*                                                                       */
   1.186 +  typedef struct  FT_WinFNT_HeaderRec_
   1.187 +  {
   1.188 +    FT_UShort  version;
   1.189 +    FT_ULong   file_size;
   1.190 +    FT_Byte    copyright[60];
   1.191 +    FT_UShort  file_type;
   1.192 +    FT_UShort  nominal_point_size;
   1.193 +    FT_UShort  vertical_resolution;
   1.194 +    FT_UShort  horizontal_resolution;
   1.195 +    FT_UShort  ascent;
   1.196 +    FT_UShort  internal_leading;
   1.197 +    FT_UShort  external_leading;
   1.198 +    FT_Byte    italic;
   1.199 +    FT_Byte    underline;
   1.200 +    FT_Byte    strike_out;
   1.201 +    FT_UShort  weight;
   1.202 +    FT_Byte    charset;
   1.203 +    FT_UShort  pixel_width;
   1.204 +    FT_UShort  pixel_height;
   1.205 +    FT_Byte    pitch_and_family;
   1.206 +    FT_UShort  avg_width;
   1.207 +    FT_UShort  max_width;
   1.208 +    FT_Byte    first_char;
   1.209 +    FT_Byte    last_char;
   1.210 +    FT_Byte    default_char;
   1.211 +    FT_Byte    break_char;
   1.212 +    FT_UShort  bytes_per_row;
   1.213 +    FT_ULong   device_offset;
   1.214 +    FT_ULong   face_name_offset;
   1.215 +    FT_ULong   bits_pointer;
   1.216 +    FT_ULong   bits_offset;
   1.217 +    FT_Byte    reserved;
   1.218 +    FT_ULong   flags;
   1.219 +    FT_UShort  A_space;
   1.220 +    FT_UShort  B_space;
   1.221 +    FT_UShort  C_space;
   1.222 +    FT_UShort  color_table_offset;
   1.223 +    FT_ULong   reserved1[4];
   1.224 +
   1.225 +  } FT_WinFNT_HeaderRec;
   1.226 +
   1.227 +
   1.228 +  /*************************************************************************/
   1.229 +  /*                                                                       */
   1.230 +  /* <Struct>                                                              */
   1.231 +  /*    FT_WinFNT_Header                                                   */
   1.232 +  /*                                                                       */
   1.233 +  /* <Description>                                                         */
   1.234 +  /*    A handle to an @FT_WinFNT_HeaderRec structure.                     */
   1.235 +  /*                                                                       */
   1.236 +  typedef struct FT_WinFNT_HeaderRec_*  FT_WinFNT_Header;
   1.237 +
   1.238 +
   1.239 +  /**********************************************************************
   1.240 +   *
   1.241 +   * @function:
   1.242 +   *    FT_Get_WinFNT_Header
   1.243 +   *
   1.244 +   * @description:
   1.245 +   *    Retrieve a Windows FNT font info header.
   1.246 +   *
   1.247 +   * @input:
   1.248 +   *    face    :: A handle to the input face.
   1.249 +   *
   1.250 +   * @output:
   1.251 +   *    aheader :: The WinFNT header.
   1.252 +   *
   1.253 +   * @return:
   1.254 +   *   FreeType error code.  0~means success.
   1.255 +   *
   1.256 +   * @note:
   1.257 +   *   This function only works with Windows FNT faces, returning an error
   1.258 +   *   otherwise.
   1.259 +   */
   1.260 +  FT_EXPORT( FT_Error )
   1.261 +  FT_Get_WinFNT_Header( FT_Face               face,
   1.262 +                        FT_WinFNT_HeaderRec  *aheader );
   1.263 +
   1.264 +
   1.265 +  /* */
   1.266 +
   1.267 +FT_END_HEADER
   1.268 +
   1.269 +#endif /* __FTWINFNT_H__ */
   1.270 +
   1.271 +
   1.272 +/* END */
   1.273 +
   1.274 +
   1.275 +/* Local Variables: */
   1.276 +/* coding: utf-8    */
   1.277 +/* End:             */