vrshoot

diff libs/ft2static/freetype/freetype.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/freetype.h	Sat Feb 01 19:58:19 2014 +0200
     1.3 @@ -0,0 +1,3919 @@
     1.4 +/***************************************************************************/
     1.5 +/*                                                                         */
     1.6 +/*  freetype.h                                                             */
     1.7 +/*                                                                         */
     1.8 +/*    FreeType high-level API and common types (specification only).       */
     1.9 +/*                                                                         */
    1.10 +/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,   */
    1.11 +/*            2010 by                                                      */
    1.12 +/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
    1.13 +/*                                                                         */
    1.14 +/*  This file is part of the FreeType project, and may only be used,       */
    1.15 +/*  modified, and distributed under the terms of the FreeType project      */
    1.16 +/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
    1.17 +/*  this file you indicate that you have read the license and              */
    1.18 +/*  understand and accept it fully.                                        */
    1.19 +/*                                                                         */
    1.20 +/***************************************************************************/
    1.21 +
    1.22 +
    1.23 +#ifndef FT_FREETYPE_H
    1.24 +#error "`ft2build.h' hasn't been included yet!"
    1.25 +#error "Please always use macros to include FreeType header files."
    1.26 +#error "Example:"
    1.27 +#error "  #include <ft2build.h>"
    1.28 +#error "  #include FT_FREETYPE_H"
    1.29 +#endif
    1.30 +
    1.31 +
    1.32 +#ifndef __FREETYPE_H__
    1.33 +#define __FREETYPE_H__
    1.34 +
    1.35 +
    1.36 +#include <ft2build.h>
    1.37 +#include FT_CONFIG_CONFIG_H
    1.38 +#include FT_ERRORS_H
    1.39 +#include FT_TYPES_H
    1.40 +
    1.41 +
    1.42 +FT_BEGIN_HEADER
    1.43 +
    1.44 +
    1.45 +
    1.46 +  /*************************************************************************/
    1.47 +  /*                                                                       */
    1.48 +  /* <Section>                                                             */
    1.49 +  /*    user_allocation                                                    */
    1.50 +  /*                                                                       */
    1.51 +  /* <Title>                                                               */
    1.52 +  /*    User allocation                                                    */
    1.53 +  /*                                                                       */
    1.54 +  /* <Abstract>                                                            */
    1.55 +  /*    How client applications should allocate FreeType data structures.  */
    1.56 +  /*                                                                       */
    1.57 +  /* <Description>                                                         */
    1.58 +  /*    FreeType assumes that structures allocated by the user and passed  */
    1.59 +  /*    as arguments are zeroed out except for the actual data.  In other  */
    1.60 +  /*    words, it is recommended to use `calloc' (or variants of it)       */
    1.61 +  /*    instead of `malloc' for allocation.                                */
    1.62 +  /*                                                                       */
    1.63 +  /*************************************************************************/
    1.64 +
    1.65 +
    1.66 +
    1.67 +  /*************************************************************************/
    1.68 +  /*************************************************************************/
    1.69 +  /*                                                                       */
    1.70 +  /*                        B A S I C   T Y P E S                          */
    1.71 +  /*                                                                       */
    1.72 +  /*************************************************************************/
    1.73 +  /*************************************************************************/
    1.74 +
    1.75 +
    1.76 +  /*************************************************************************/
    1.77 +  /*                                                                       */
    1.78 +  /* <Section>                                                             */
    1.79 +  /*    base_interface                                                     */
    1.80 +  /*                                                                       */
    1.81 +  /* <Title>                                                               */
    1.82 +  /*    Base Interface                                                     */
    1.83 +  /*                                                                       */
    1.84 +  /* <Abstract>                                                            */
    1.85 +  /*    The FreeType~2 base font interface.                                */
    1.86 +  /*                                                                       */
    1.87 +  /* <Description>                                                         */
    1.88 +  /*    This section describes the public high-level API of FreeType~2.    */
    1.89 +  /*                                                                       */
    1.90 +  /* <Order>                                                               */
    1.91 +  /*    FT_Library                                                         */
    1.92 +  /*    FT_Face                                                            */
    1.93 +  /*    FT_Size                                                            */
    1.94 +  /*    FT_GlyphSlot                                                       */
    1.95 +  /*    FT_CharMap                                                         */
    1.96 +  /*    FT_Encoding                                                        */
    1.97 +  /*                                                                       */
    1.98 +  /*    FT_FaceRec                                                         */
    1.99 +  /*                                                                       */
   1.100 +  /*    FT_FACE_FLAG_SCALABLE                                              */
   1.101 +  /*    FT_FACE_FLAG_FIXED_SIZES                                           */
   1.102 +  /*    FT_FACE_FLAG_FIXED_WIDTH                                           */
   1.103 +  /*    FT_FACE_FLAG_HORIZONTAL                                            */
   1.104 +  /*    FT_FACE_FLAG_VERTICAL                                              */
   1.105 +  /*    FT_FACE_FLAG_SFNT                                                  */
   1.106 +  /*    FT_FACE_FLAG_KERNING                                               */
   1.107 +  /*    FT_FACE_FLAG_MULTIPLE_MASTERS                                      */
   1.108 +  /*    FT_FACE_FLAG_GLYPH_NAMES                                           */
   1.109 +  /*    FT_FACE_FLAG_EXTERNAL_STREAM                                       */
   1.110 +  /*    FT_FACE_FLAG_FAST_GLYPHS                                           */
   1.111 +  /*    FT_FACE_FLAG_HINTER                                                */
   1.112 +  /*                                                                       */
   1.113 +  /*    FT_STYLE_FLAG_BOLD                                                 */
   1.114 +  /*    FT_STYLE_FLAG_ITALIC                                               */
   1.115 +  /*                                                                       */
   1.116 +  /*    FT_SizeRec                                                         */
   1.117 +  /*    FT_Size_Metrics                                                    */
   1.118 +  /*                                                                       */
   1.119 +  /*    FT_GlyphSlotRec                                                    */
   1.120 +  /*    FT_Glyph_Metrics                                                   */
   1.121 +  /*    FT_SubGlyph                                                        */
   1.122 +  /*                                                                       */
   1.123 +  /*    FT_Bitmap_Size                                                     */
   1.124 +  /*                                                                       */
   1.125 +  /*    FT_Init_FreeType                                                   */
   1.126 +  /*    FT_Done_FreeType                                                   */
   1.127 +  /*                                                                       */
   1.128 +  /*    FT_New_Face                                                        */
   1.129 +  /*    FT_Done_Face                                                       */
   1.130 +  /*    FT_New_Memory_Face                                                 */
   1.131 +  /*    FT_Open_Face                                                       */
   1.132 +  /*    FT_Open_Args                                                       */
   1.133 +  /*    FT_Parameter                                                       */
   1.134 +  /*    FT_Attach_File                                                     */
   1.135 +  /*    FT_Attach_Stream                                                   */
   1.136 +  /*                                                                       */
   1.137 +  /*    FT_Set_Char_Size                                                   */
   1.138 +  /*    FT_Set_Pixel_Sizes                                                 */
   1.139 +  /*    FT_Request_Size                                                    */
   1.140 +  /*    FT_Select_Size                                                     */
   1.141 +  /*    FT_Size_Request_Type                                               */
   1.142 +  /*    FT_Size_Request                                                    */
   1.143 +  /*    FT_Set_Transform                                                   */
   1.144 +  /*    FT_Load_Glyph                                                      */
   1.145 +  /*    FT_Get_Char_Index                                                  */
   1.146 +  /*    FT_Get_Name_Index                                                  */
   1.147 +  /*    FT_Load_Char                                                       */
   1.148 +  /*                                                                       */
   1.149 +  /*    FT_OPEN_MEMORY                                                     */
   1.150 +  /*    FT_OPEN_STREAM                                                     */
   1.151 +  /*    FT_OPEN_PATHNAME                                                   */
   1.152 +  /*    FT_OPEN_DRIVER                                                     */
   1.153 +  /*    FT_OPEN_PARAMS                                                     */
   1.154 +  /*                                                                       */
   1.155 +  /*    FT_LOAD_DEFAULT                                                    */
   1.156 +  /*    FT_LOAD_RENDER                                                     */
   1.157 +  /*    FT_LOAD_MONOCHROME                                                 */
   1.158 +  /*    FT_LOAD_LINEAR_DESIGN                                              */
   1.159 +  /*    FT_LOAD_NO_SCALE                                                   */
   1.160 +  /*    FT_LOAD_NO_HINTING                                                 */
   1.161 +  /*    FT_LOAD_NO_BITMAP                                                  */
   1.162 +  /*    FT_LOAD_CROP_BITMAP                                                */
   1.163 +  /*                                                                       */
   1.164 +  /*    FT_LOAD_VERTICAL_LAYOUT                                            */
   1.165 +  /*    FT_LOAD_IGNORE_TRANSFORM                                           */
   1.166 +  /*    FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH                                */
   1.167 +  /*    FT_LOAD_FORCE_AUTOHINT                                             */
   1.168 +  /*    FT_LOAD_NO_RECURSE                                                 */
   1.169 +  /*    FT_LOAD_PEDANTIC                                                   */
   1.170 +  /*                                                                       */
   1.171 +  /*    FT_LOAD_TARGET_NORMAL                                              */
   1.172 +  /*    FT_LOAD_TARGET_LIGHT                                               */
   1.173 +  /*    FT_LOAD_TARGET_MONO                                                */
   1.174 +  /*    FT_LOAD_TARGET_LCD                                                 */
   1.175 +  /*    FT_LOAD_TARGET_LCD_V                                               */
   1.176 +  /*                                                                       */
   1.177 +  /*    FT_Render_Glyph                                                    */
   1.178 +  /*    FT_Render_Mode                                                     */
   1.179 +  /*    FT_Get_Kerning                                                     */
   1.180 +  /*    FT_Kerning_Mode                                                    */
   1.181 +  /*    FT_Get_Track_Kerning                                               */
   1.182 +  /*    FT_Get_Glyph_Name                                                  */
   1.183 +  /*    FT_Get_Postscript_Name                                             */
   1.184 +  /*                                                                       */
   1.185 +  /*    FT_CharMapRec                                                      */
   1.186 +  /*    FT_Select_Charmap                                                  */
   1.187 +  /*    FT_Set_Charmap                                                     */
   1.188 +  /*    FT_Get_Charmap_Index                                               */
   1.189 +  /*                                                                       */
   1.190 +  /*    FT_FSTYPE_INSTALLABLE_EMBEDDING                                    */
   1.191 +  /*    FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING                             */
   1.192 +  /*    FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING                              */
   1.193 +  /*    FT_FSTYPE_EDITABLE_EMBEDDING                                       */
   1.194 +  /*    FT_FSTYPE_NO_SUBSETTING                                            */
   1.195 +  /*    FT_FSTYPE_BITMAP_EMBEDDING_ONLY                                    */
   1.196 +  /*                                                                       */
   1.197 +  /*    FT_Get_FSType_Flags                                                */
   1.198 +  /*                                                                       */
   1.199 +  /*************************************************************************/
   1.200 +
   1.201 +
   1.202 +  /*************************************************************************/
   1.203 +  /*                                                                       */
   1.204 +  /* <Struct>                                                              */
   1.205 +  /*    FT_Glyph_Metrics                                                   */
   1.206 +  /*                                                                       */
   1.207 +  /* <Description>                                                         */
   1.208 +  /*    A structure used to model the metrics of a single glyph.  The      */
   1.209 +  /*    values are expressed in 26.6 fractional pixel format; if the flag  */
   1.210 +  /*    @FT_LOAD_NO_SCALE has been used while loading the glyph, values    */
   1.211 +  /*    are expressed in font units instead.                               */
   1.212 +  /*                                                                       */
   1.213 +  /* <Fields>                                                              */
   1.214 +  /*    width ::                                                           */
   1.215 +  /*      The glyph's width.                                               */
   1.216 +  /*                                                                       */
   1.217 +  /*    height ::                                                          */
   1.218 +  /*      The glyph's height.                                              */
   1.219 +  /*                                                                       */
   1.220 +  /*    horiBearingX ::                                                    */
   1.221 +  /*      Left side bearing for horizontal layout.                         */
   1.222 +  /*                                                                       */
   1.223 +  /*    horiBearingY ::                                                    */
   1.224 +  /*      Top side bearing for horizontal layout.                          */
   1.225 +  /*                                                                       */
   1.226 +  /*    horiAdvance ::                                                     */
   1.227 +  /*      Advance width for horizontal layout.                             */
   1.228 +  /*                                                                       */
   1.229 +  /*    vertBearingX ::                                                    */
   1.230 +  /*      Left side bearing for vertical layout.                           */
   1.231 +  /*                                                                       */
   1.232 +  /*    vertBearingY ::                                                    */
   1.233 +  /*      Top side bearing for vertical layout.                            */
   1.234 +  /*                                                                       */
   1.235 +  /*    vertAdvance ::                                                     */
   1.236 +  /*      Advance height for vertical layout.                              */
   1.237 +  /*                                                                       */
   1.238 +  /* <Note>                                                                */
   1.239 +  /*    If not disabled with @FT_LOAD_NO_HINTING, the values represent     */
   1.240 +  /*    dimensions of the hinted glyph (in case hinting is applicable).    */
   1.241 +  /*                                                                       */
   1.242 +  typedef struct  FT_Glyph_Metrics_
   1.243 +  {
   1.244 +    FT_Pos  width;
   1.245 +    FT_Pos  height;
   1.246 +
   1.247 +    FT_Pos  horiBearingX;
   1.248 +    FT_Pos  horiBearingY;
   1.249 +    FT_Pos  horiAdvance;
   1.250 +
   1.251 +    FT_Pos  vertBearingX;
   1.252 +    FT_Pos  vertBearingY;
   1.253 +    FT_Pos  vertAdvance;
   1.254 +
   1.255 +  } FT_Glyph_Metrics;
   1.256 +
   1.257 +
   1.258 +  /*************************************************************************/
   1.259 +  /*                                                                       */
   1.260 +  /* <Struct>                                                              */
   1.261 +  /*    FT_Bitmap_Size                                                     */
   1.262 +  /*                                                                       */
   1.263 +  /* <Description>                                                         */
   1.264 +  /*    This structure models the metrics of a bitmap strike (i.e., a set  */
   1.265 +  /*    of glyphs for a given point size and resolution) in a bitmap font. */
   1.266 +  /*    It is used for the `available_sizes' field of @FT_Face.            */
   1.267 +  /*                                                                       */
   1.268 +  /* <Fields>                                                              */
   1.269 +  /*    height :: The vertical distance, in pixels, between two            */
   1.270 +  /*              consecutive baselines.  It is always positive.           */
   1.271 +  /*                                                                       */
   1.272 +  /*    width  :: The average width, in pixels, of all glyphs in the       */
   1.273 +  /*              strike.                                                  */
   1.274 +  /*                                                                       */
   1.275 +  /*    size   :: The nominal size of the strike in 26.6 fractional        */
   1.276 +  /*              points.  This field is not very useful.                  */
   1.277 +  /*                                                                       */
   1.278 +  /*    x_ppem :: The horizontal ppem (nominal width) in 26.6 fractional   */
   1.279 +  /*              pixels.                                                  */
   1.280 +  /*                                                                       */
   1.281 +  /*    y_ppem :: The vertical ppem (nominal height) in 26.6 fractional    */
   1.282 +  /*              pixels.                                                  */
   1.283 +  /*                                                                       */
   1.284 +  /* <Note>                                                                */
   1.285 +  /*    Windows FNT:                                                       */
   1.286 +  /*      The nominal size given in a FNT font is not reliable.  Thus when */
   1.287 +  /*      the driver finds it incorrect, it sets `size' to some calculated */
   1.288 +  /*      values and sets `x_ppem' and `y_ppem' to the pixel width and     */
   1.289 +  /*      height given in the font, respectively.                          */
   1.290 +  /*                                                                       */
   1.291 +  /*    TrueType embedded bitmaps:                                         */
   1.292 +  /*      `size', `width', and `height' values are not contained in the    */
   1.293 +  /*      bitmap strike itself.  They are computed from the global font    */
   1.294 +  /*      parameters.                                                      */
   1.295 +  /*                                                                       */
   1.296 +  typedef struct  FT_Bitmap_Size_
   1.297 +  {
   1.298 +    FT_Short  height;
   1.299 +    FT_Short  width;
   1.300 +
   1.301 +    FT_Pos    size;
   1.302 +
   1.303 +    FT_Pos    x_ppem;
   1.304 +    FT_Pos    y_ppem;
   1.305 +
   1.306 +  } FT_Bitmap_Size;
   1.307 +
   1.308 +
   1.309 +  /*************************************************************************/
   1.310 +  /*************************************************************************/
   1.311 +  /*                                                                       */
   1.312 +  /*                     O B J E C T   C L A S S E S                       */
   1.313 +  /*                                                                       */
   1.314 +  /*************************************************************************/
   1.315 +  /*************************************************************************/
   1.316 +
   1.317 +  /*************************************************************************/
   1.318 +  /*                                                                       */
   1.319 +  /* <Type>                                                                */
   1.320 +  /*    FT_Library                                                         */
   1.321 +  /*                                                                       */
   1.322 +  /* <Description>                                                         */
   1.323 +  /*    A handle to a FreeType library instance.  Each `library' is        */
   1.324 +  /*    completely independent from the others; it is the `root' of a set  */
   1.325 +  /*    of objects like fonts, faces, sizes, etc.                          */
   1.326 +  /*                                                                       */
   1.327 +  /*    It also embeds a memory manager (see @FT_Memory), as well as a     */
   1.328 +  /*    scan-line converter object (see @FT_Raster).                       */
   1.329 +  /*                                                                       */
   1.330 +  /*    For multi-threading applications each thread should have its own   */
   1.331 +  /*    FT_Library object.                                                 */
   1.332 +  /*                                                                       */
   1.333 +  /* <Note>                                                                */
   1.334 +  /*    Library objects are normally created by @FT_Init_FreeType, and     */
   1.335 +  /*    destroyed with @FT_Done_FreeType.                                  */
   1.336 +  /*                                                                       */
   1.337 +  typedef struct FT_LibraryRec_  *FT_Library;
   1.338 +
   1.339 +
   1.340 +  /*************************************************************************/
   1.341 +  /*                                                                       */
   1.342 +  /* <Type>                                                                */
   1.343 +  /*    FT_Module                                                          */
   1.344 +  /*                                                                       */
   1.345 +  /* <Description>                                                         */
   1.346 +  /*    A handle to a given FreeType module object.  Each module can be a  */
   1.347 +  /*    font driver, a renderer, or anything else that provides services   */
   1.348 +  /*    to the formers.                                                    */
   1.349 +  /*                                                                       */
   1.350 +  typedef struct FT_ModuleRec_*  FT_Module;
   1.351 +
   1.352 +
   1.353 +  /*************************************************************************/
   1.354 +  /*                                                                       */
   1.355 +  /* <Type>                                                                */
   1.356 +  /*    FT_Driver                                                          */
   1.357 +  /*                                                                       */
   1.358 +  /* <Description>                                                         */
   1.359 +  /*    A handle to a given FreeType font driver object.  Each font driver */
   1.360 +  /*    is a special module capable of creating faces from font files.     */
   1.361 +  /*                                                                       */
   1.362 +  typedef struct FT_DriverRec_*  FT_Driver;
   1.363 +
   1.364 +
   1.365 +  /*************************************************************************/
   1.366 +  /*                                                                       */
   1.367 +  /* <Type>                                                                */
   1.368 +  /*    FT_Renderer                                                        */
   1.369 +  /*                                                                       */
   1.370 +  /* <Description>                                                         */
   1.371 +  /*    A handle to a given FreeType renderer.  A renderer is a special    */
   1.372 +  /*    module in charge of converting a glyph image to a bitmap, when     */
   1.373 +  /*    necessary.  Each renderer supports a given glyph image format, and */
   1.374 +  /*    one or more target surface depths.                                 */
   1.375 +  /*                                                                       */
   1.376 +  typedef struct FT_RendererRec_*  FT_Renderer;
   1.377 +
   1.378 +
   1.379 +  /*************************************************************************/
   1.380 +  /*                                                                       */
   1.381 +  /* <Type>                                                                */
   1.382 +  /*    FT_Face                                                            */
   1.383 +  /*                                                                       */
   1.384 +  /* <Description>                                                         */
   1.385 +  /*    A handle to a given typographic face object.  A face object models */
   1.386 +  /*    a given typeface, in a given style.                                */
   1.387 +  /*                                                                       */
   1.388 +  /* <Note>                                                                */
   1.389 +  /*    Each face object also owns a single @FT_GlyphSlot object, as well  */
   1.390 +  /*    as one or more @FT_Size objects.                                   */
   1.391 +  /*                                                                       */
   1.392 +  /*    Use @FT_New_Face or @FT_Open_Face to create a new face object from */
   1.393 +  /*    a given filepathname or a custom input stream.                     */
   1.394 +  /*                                                                       */
   1.395 +  /*    Use @FT_Done_Face to destroy it (along with its slot and sizes).   */
   1.396 +  /*                                                                       */
   1.397 +  /* <Also>                                                                */
   1.398 +  /*    See @FT_FaceRec for the publicly accessible fields of a given face */
   1.399 +  /*    object.                                                            */
   1.400 +  /*                                                                       */
   1.401 +  typedef struct FT_FaceRec_*  FT_Face;
   1.402 +
   1.403 +
   1.404 +  /*************************************************************************/
   1.405 +  /*                                                                       */
   1.406 +  /* <Type>                                                                */
   1.407 +  /*    FT_Size                                                            */
   1.408 +  /*                                                                       */
   1.409 +  /* <Description>                                                         */
   1.410 +  /*    A handle to an object used to model a face scaled to a given       */
   1.411 +  /*    character size.                                                    */
   1.412 +  /*                                                                       */
   1.413 +  /* <Note>                                                                */
   1.414 +  /*    Each @FT_Face has an _active_ @FT_Size object that is used by      */
   1.415 +  /*    functions like @FT_Load_Glyph to determine the scaling             */
   1.416 +  /*    transformation which is used to load and hint glyphs and metrics.  */
   1.417 +  /*                                                                       */
   1.418 +  /*    You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes,                */
   1.419 +  /*    @FT_Request_Size or even @FT_Select_Size to change the content     */
   1.420 +  /*    (i.e., the scaling values) of the active @FT_Size.                 */
   1.421 +  /*                                                                       */
   1.422 +  /*    You can use @FT_New_Size to create additional size objects for a   */
   1.423 +  /*    given @FT_Face, but they won't be used by other functions until    */
   1.424 +  /*    you activate it through @FT_Activate_Size.  Only one size can be   */
   1.425 +  /*    activated at any given time per face.                              */
   1.426 +  /*                                                                       */
   1.427 +  /* <Also>                                                                */
   1.428 +  /*    See @FT_SizeRec for the publicly accessible fields of a given size */
   1.429 +  /*    object.                                                            */
   1.430 +  /*                                                                       */
   1.431 +  typedef struct FT_SizeRec_*  FT_Size;
   1.432 +
   1.433 +
   1.434 +  /*************************************************************************/
   1.435 +  /*                                                                       */
   1.436 +  /* <Type>                                                                */
   1.437 +  /*    FT_GlyphSlot                                                       */
   1.438 +  /*                                                                       */
   1.439 +  /* <Description>                                                         */
   1.440 +  /*    A handle to a given `glyph slot'.  A slot is a container where it  */
   1.441 +  /*    is possible to load any of the glyphs contained in its parent      */
   1.442 +  /*    face.                                                              */
   1.443 +  /*                                                                       */
   1.444 +  /*    In other words, each time you call @FT_Load_Glyph or               */
   1.445 +  /*    @FT_Load_Char, the slot's content is erased by the new glyph data, */
   1.446 +  /*    i.e., the glyph's metrics, its image (bitmap or outline), and      */
   1.447 +  /*    other control information.                                         */
   1.448 +  /*                                                                       */
   1.449 +  /* <Also>                                                                */
   1.450 +  /*    See @FT_GlyphSlotRec for the publicly accessible glyph fields.     */
   1.451 +  /*                                                                       */
   1.452 +  typedef struct FT_GlyphSlotRec_*  FT_GlyphSlot;
   1.453 +
   1.454 +
   1.455 +  /*************************************************************************/
   1.456 +  /*                                                                       */
   1.457 +  /* <Type>                                                                */
   1.458 +  /*    FT_CharMap                                                         */
   1.459 +  /*                                                                       */
   1.460 +  /* <Description>                                                         */
   1.461 +  /*    A handle to a given character map.  A charmap is used to translate */
   1.462 +  /*    character codes in a given encoding into glyph indexes for its     */
   1.463 +  /*    parent's face.  Some font formats may provide several charmaps per */
   1.464 +  /*    font.                                                              */
   1.465 +  /*                                                                       */
   1.466 +  /*    Each face object owns zero or more charmaps, but only one of them  */
   1.467 +  /*    can be `active' and used by @FT_Get_Char_Index or @FT_Load_Char.   */
   1.468 +  /*                                                                       */
   1.469 +  /*    The list of available charmaps in a face is available through the  */
   1.470 +  /*    `face->num_charmaps' and `face->charmaps' fields of @FT_FaceRec.   */
   1.471 +  /*                                                                       */
   1.472 +  /*    The currently active charmap is available as `face->charmap'.      */
   1.473 +  /*    You should call @FT_Set_Charmap to change it.                      */
   1.474 +  /*                                                                       */
   1.475 +  /* <Note>                                                                */
   1.476 +  /*    When a new face is created (either through @FT_New_Face or         */
   1.477 +  /*    @FT_Open_Face), the library looks for a Unicode charmap within     */
   1.478 +  /*    the list and automatically activates it.                           */
   1.479 +  /*                                                                       */
   1.480 +  /* <Also>                                                                */
   1.481 +  /*    See @FT_CharMapRec for the publicly accessible fields of a given   */
   1.482 +  /*    character map.                                                     */
   1.483 +  /*                                                                       */
   1.484 +  typedef struct FT_CharMapRec_*  FT_CharMap;
   1.485 +
   1.486 +
   1.487 +  /*************************************************************************/
   1.488 +  /*                                                                       */
   1.489 +  /* <Macro>                                                               */
   1.490 +  /*    FT_ENC_TAG                                                         */
   1.491 +  /*                                                                       */
   1.492 +  /* <Description>                                                         */
   1.493 +  /*    This macro converts four-letter tags into an unsigned long.  It is */
   1.494 +  /*    used to define `encoding' identifiers (see @FT_Encoding).          */
   1.495 +  /*                                                                       */
   1.496 +  /* <Note>                                                                */
   1.497 +  /*    Since many 16-bit compilers don't like 32-bit enumerations, you    */
   1.498 +  /*    should redefine this macro in case of problems to something like   */
   1.499 +  /*    this:                                                              */
   1.500 +  /*                                                                       */
   1.501 +  /*    {                                                                  */
   1.502 +  /*      #define FT_ENC_TAG( value, a, b, c, d )  value                   */
   1.503 +  /*    }                                                                  */
   1.504 +  /*                                                                       */
   1.505 +  /*    to get a simple enumeration without assigning special numbers.     */
   1.506 +  /*                                                                       */
   1.507 +
   1.508 +#ifndef FT_ENC_TAG
   1.509 +#define FT_ENC_TAG( value, a, b, c, d )         \
   1.510 +          value = ( ( (FT_UInt32)(a) << 24 ) |  \
   1.511 +                    ( (FT_UInt32)(b) << 16 ) |  \
   1.512 +                    ( (FT_UInt32)(c) <<  8 ) |  \
   1.513 +                      (FT_UInt32)(d)         )
   1.514 +
   1.515 +#endif /* FT_ENC_TAG */
   1.516 +
   1.517 +
   1.518 +  /*************************************************************************/
   1.519 +  /*                                                                       */
   1.520 +  /* <Enum>                                                                */
   1.521 +  /*    FT_Encoding                                                        */
   1.522 +  /*                                                                       */
   1.523 +  /* <Description>                                                         */
   1.524 +  /*    An enumeration used to specify character sets supported by         */
   1.525 +  /*    charmaps.  Used in the @FT_Select_Charmap API function.            */
   1.526 +  /*                                                                       */
   1.527 +  /* <Note>                                                                */
   1.528 +  /*    Despite the name, this enumeration lists specific character        */
   1.529 +  /*    repertories (i.e., charsets), and not text encoding methods (e.g., */
   1.530 +  /*    UTF-8, UTF-16, etc.).                                              */
   1.531 +  /*                                                                       */
   1.532 +  /*    Other encodings might be defined in the future.                    */
   1.533 +  /*                                                                       */
   1.534 +  /* <Values>                                                              */
   1.535 +  /*    FT_ENCODING_NONE ::                                                */
   1.536 +  /*      The encoding value~0 is reserved.                                */
   1.537 +  /*                                                                       */
   1.538 +  /*    FT_ENCODING_UNICODE ::                                             */
   1.539 +  /*      Corresponds to the Unicode character set.  This value covers     */
   1.540 +  /*      all versions of the Unicode repertoire, including ASCII and      */
   1.541 +  /*      Latin-1.  Most fonts include a Unicode charmap, but not all      */
   1.542 +  /*      of them.                                                         */
   1.543 +  /*                                                                       */
   1.544 +  /*      For example, if you want to access Unicode value U+1F028 (and    */
   1.545 +  /*      the font contains it), use value 0x1F028 as the input value for  */
   1.546 +  /*      @FT_Get_Char_Index.                                              */
   1.547 +  /*                                                                       */
   1.548 +  /*    FT_ENCODING_MS_SYMBOL ::                                           */
   1.549 +  /*      Corresponds to the Microsoft Symbol encoding, used to encode     */
   1.550 +  /*      mathematical symbols in the 32..255 character code range.  For   */
   1.551 +  /*      more information, see `http://www.ceviz.net/symbol.htm'.         */
   1.552 +  /*                                                                       */
   1.553 +  /*    FT_ENCODING_SJIS ::                                                */
   1.554 +  /*      Corresponds to Japanese SJIS encoding.  More info at             */
   1.555 +  /*      at `http://langsupport.japanreference.com/encoding.shtml'.       */
   1.556 +  /*      See note on multi-byte encodings below.                          */
   1.557 +  /*                                                                       */
   1.558 +  /*    FT_ENCODING_GB2312 ::                                              */
   1.559 +  /*      Corresponds to an encoding system for Simplified Chinese as used */
   1.560 +  /*      used in mainland China.                                          */
   1.561 +  /*                                                                       */
   1.562 +  /*    FT_ENCODING_BIG5 ::                                                */
   1.563 +  /*      Corresponds to an encoding system for Traditional Chinese as     */
   1.564 +  /*      used in Taiwan and Hong Kong.                                    */
   1.565 +  /*                                                                       */
   1.566 +  /*    FT_ENCODING_WANSUNG ::                                             */
   1.567 +  /*      Corresponds to the Korean encoding system known as Wansung.      */
   1.568 +  /*      For more information see                                         */
   1.569 +  /*      `http://www.microsoft.com/typography/unicode/949.txt'.           */
   1.570 +  /*                                                                       */
   1.571 +  /*    FT_ENCODING_JOHAB ::                                               */
   1.572 +  /*      The Korean standard character set (KS~C 5601-1992), which        */
   1.573 +  /*      corresponds to MS Windows code page 1361.  This character set    */
   1.574 +  /*      includes all possible Hangeul character combinations.            */
   1.575 +  /*                                                                       */
   1.576 +  /*    FT_ENCODING_ADOBE_LATIN_1 ::                                       */
   1.577 +  /*      Corresponds to a Latin-1 encoding as defined in a Type~1         */
   1.578 +  /*      PostScript font.  It is limited to 256 character codes.          */
   1.579 +  /*                                                                       */
   1.580 +  /*    FT_ENCODING_ADOBE_STANDARD ::                                      */
   1.581 +  /*      Corresponds to the Adobe Standard encoding, as found in Type~1,  */
   1.582 +  /*      CFF, and OpenType/CFF fonts.  It is limited to 256 character     */
   1.583 +  /*      codes.                                                           */
   1.584 +  /*                                                                       */
   1.585 +  /*    FT_ENCODING_ADOBE_EXPERT ::                                        */
   1.586 +  /*      Corresponds to the Adobe Expert encoding, as found in Type~1,    */
   1.587 +  /*      CFF, and OpenType/CFF fonts.  It is limited to 256 character     */
   1.588 +  /*      codes.                                                           */
   1.589 +  /*                                                                       */
   1.590 +  /*    FT_ENCODING_ADOBE_CUSTOM ::                                        */
   1.591 +  /*      Corresponds to a custom encoding, as found in Type~1, CFF, and   */
   1.592 +  /*      OpenType/CFF fonts.  It is limited to 256 character codes.       */
   1.593 +  /*                                                                       */
   1.594 +  /*    FT_ENCODING_APPLE_ROMAN ::                                         */
   1.595 +  /*      Corresponds to the 8-bit Apple roman encoding.  Many TrueType    */
   1.596 +  /*      and OpenType fonts contain a charmap for this encoding, since    */
   1.597 +  /*      older versions of Mac OS are able to use it.                     */
   1.598 +  /*                                                                       */
   1.599 +  /*    FT_ENCODING_OLD_LATIN_2 ::                                         */
   1.600 +  /*      This value is deprecated and was never used nor reported by      */
   1.601 +  /*      FreeType.  Don't use or test for it.                             */
   1.602 +  /*                                                                       */
   1.603 +  /*    FT_ENCODING_MS_SJIS ::                                             */
   1.604 +  /*      Same as FT_ENCODING_SJIS.  Deprecated.                           */
   1.605 +  /*                                                                       */
   1.606 +  /*    FT_ENCODING_MS_GB2312 ::                                           */
   1.607 +  /*      Same as FT_ENCODING_GB2312.  Deprecated.                         */
   1.608 +  /*                                                                       */
   1.609 +  /*    FT_ENCODING_MS_BIG5 ::                                             */
   1.610 +  /*      Same as FT_ENCODING_BIG5.  Deprecated.                           */
   1.611 +  /*                                                                       */
   1.612 +  /*    FT_ENCODING_MS_WANSUNG ::                                          */
   1.613 +  /*      Same as FT_ENCODING_WANSUNG.  Deprecated.                        */
   1.614 +  /*                                                                       */
   1.615 +  /*    FT_ENCODING_MS_JOHAB ::                                            */
   1.616 +  /*      Same as FT_ENCODING_JOHAB.  Deprecated.                          */
   1.617 +  /*                                                                       */
   1.618 +  /* <Note>                                                                */
   1.619 +  /*    By default, FreeType automatically synthesizes a Unicode charmap   */
   1.620 +  /*    for PostScript fonts, using their glyph names dictionaries.        */
   1.621 +  /*    However, it also reports the encodings defined explicitly in the   */
   1.622 +  /*    font file, for the cases when they are needed, with the Adobe      */
   1.623 +  /*    values as well.                                                    */
   1.624 +  /*                                                                       */
   1.625 +  /*    FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap  */
   1.626 +  /*    is neither Unicode nor ISO-8859-1 (otherwise it is set to          */
   1.627 +  /*    FT_ENCODING_UNICODE).  Use @FT_Get_BDF_Charset_ID to find out      */
   1.628 +  /*    which encoding is really present.  If, for example, the            */
   1.629 +  /*    `cs_registry' field is `KOI8' and the `cs_encoding' field is `R',  */
   1.630 +  /*    the font is encoded in KOI8-R.                                     */
   1.631 +  /*                                                                       */
   1.632 +  /*    FT_ENCODING_NONE is always set (with a single exception) by the    */
   1.633 +  /*    winfonts driver.  Use @FT_Get_WinFNT_Header and examine the        */
   1.634 +  /*    `charset' field of the @FT_WinFNT_HeaderRec structure to find out  */
   1.635 +  /*    which encoding is really present.  For example,                    */
   1.636 +  /*    @FT_WinFNT_ID_CP1251 (204) means Windows code page 1251 (for       */
   1.637 +  /*    Russian).                                                          */
   1.638 +  /*                                                                       */
   1.639 +  /*    FT_ENCODING_NONE is set if `platform_id' is @TT_PLATFORM_MACINTOSH */
   1.640 +  /*    and `encoding_id' is not @TT_MAC_ID_ROMAN (otherwise it is set to  */
   1.641 +  /*    FT_ENCODING_APPLE_ROMAN).                                          */
   1.642 +  /*                                                                       */
   1.643 +  /*    If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function       */
   1.644 +  /*    @FT_Get_CMap_Language_ID  to query the Mac language ID which may   */
   1.645 +  /*    be needed to be able to distinguish Apple encoding variants.  See  */
   1.646 +  /*                                                                       */
   1.647 +  /*      http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/README.TXT  */
   1.648 +  /*                                                                       */
   1.649 +  /*    to get an idea how to do that.  Basically, if the language ID      */
   1.650 +  /*    is~0, don't use it, otherwise subtract 1 from the language ID.     */
   1.651 +  /*    Then examine `encoding_id'.  If, for example, `encoding_id' is     */
   1.652 +  /*    @TT_MAC_ID_ROMAN and the language ID (minus~1) is                  */
   1.653 +  /*    `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman.        */
   1.654 +  /*    @TT_MAC_ID_ARABIC with `TT_MAC_LANGID_FARSI' means the Farsi       */
   1.655 +  /*    variant the Arabic encoding.                                       */
   1.656 +  /*                                                                       */
   1.657 +  typedef enum  FT_Encoding_
   1.658 +  {
   1.659 +    FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ),
   1.660 +
   1.661 +    FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ),
   1.662 +    FT_ENC_TAG( FT_ENCODING_UNICODE,   'u', 'n', 'i', 'c' ),
   1.663 +
   1.664 +    FT_ENC_TAG( FT_ENCODING_SJIS,    's', 'j', 'i', 's' ),
   1.665 +    FT_ENC_TAG( FT_ENCODING_GB2312,  'g', 'b', ' ', ' ' ),
   1.666 +    FT_ENC_TAG( FT_ENCODING_BIG5,    'b', 'i', 'g', '5' ),
   1.667 +    FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ),
   1.668 +    FT_ENC_TAG( FT_ENCODING_JOHAB,   'j', 'o', 'h', 'a' ),
   1.669 +
   1.670 +    /* for backwards compatibility */
   1.671 +    FT_ENCODING_MS_SJIS    = FT_ENCODING_SJIS,
   1.672 +    FT_ENCODING_MS_GB2312  = FT_ENCODING_GB2312,
   1.673 +    FT_ENCODING_MS_BIG5    = FT_ENCODING_BIG5,
   1.674 +    FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,
   1.675 +    FT_ENCODING_MS_JOHAB   = FT_ENCODING_JOHAB,
   1.676 +
   1.677 +    FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ),
   1.678 +    FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT,   'A', 'D', 'B', 'E' ),
   1.679 +    FT_ENC_TAG( FT_ENCODING_ADOBE_CUSTOM,   'A', 'D', 'B', 'C' ),
   1.680 +    FT_ENC_TAG( FT_ENCODING_ADOBE_LATIN_1,  'l', 'a', 't', '1' ),
   1.681 +
   1.682 +    FT_ENC_TAG( FT_ENCODING_OLD_LATIN_2, 'l', 'a', 't', '2' ),
   1.683 +
   1.684 +    FT_ENC_TAG( FT_ENCODING_APPLE_ROMAN, 'a', 'r', 'm', 'n' )
   1.685 +
   1.686 +  } FT_Encoding;
   1.687 +
   1.688 +
   1.689 +  /*************************************************************************/
   1.690 +  /*                                                                       */
   1.691 +  /* <Enum>                                                                */
   1.692 +  /*    ft_encoding_xxx                                                    */
   1.693 +  /*                                                                       */
   1.694 +  /* <Description>                                                         */
   1.695 +  /*    These constants are deprecated; use the corresponding @FT_Encoding */
   1.696 +  /*    values instead.                                                    */
   1.697 +  /*                                                                       */
   1.698 +#define ft_encoding_none            FT_ENCODING_NONE
   1.699 +#define ft_encoding_unicode         FT_ENCODING_UNICODE
   1.700 +#define ft_encoding_symbol          FT_ENCODING_MS_SYMBOL
   1.701 +#define ft_encoding_latin_1         FT_ENCODING_ADOBE_LATIN_1
   1.702 +#define ft_encoding_latin_2         FT_ENCODING_OLD_LATIN_2
   1.703 +#define ft_encoding_sjis            FT_ENCODING_SJIS
   1.704 +#define ft_encoding_gb2312          FT_ENCODING_GB2312
   1.705 +#define ft_encoding_big5            FT_ENCODING_BIG5
   1.706 +#define ft_encoding_wansung         FT_ENCODING_WANSUNG
   1.707 +#define ft_encoding_johab           FT_ENCODING_JOHAB
   1.708 +
   1.709 +#define ft_encoding_adobe_standard  FT_ENCODING_ADOBE_STANDARD
   1.710 +#define ft_encoding_adobe_expert    FT_ENCODING_ADOBE_EXPERT
   1.711 +#define ft_encoding_adobe_custom    FT_ENCODING_ADOBE_CUSTOM
   1.712 +#define ft_encoding_apple_roman     FT_ENCODING_APPLE_ROMAN
   1.713 +
   1.714 +
   1.715 +  /*************************************************************************/
   1.716 +  /*                                                                       */
   1.717 +  /* <Struct>                                                              */
   1.718 +  /*    FT_CharMapRec                                                      */
   1.719 +  /*                                                                       */
   1.720 +  /* <Description>                                                         */
   1.721 +  /*    The base charmap structure.                                        */
   1.722 +  /*                                                                       */
   1.723 +  /* <Fields>                                                              */
   1.724 +  /*    face        :: A handle to the parent face object.                 */
   1.725 +  /*                                                                       */
   1.726 +  /*    encoding    :: An @FT_Encoding tag identifying the charmap.  Use   */
   1.727 +  /*                   this with @FT_Select_Charmap.                       */
   1.728 +  /*                                                                       */
   1.729 +  /*    platform_id :: An ID number describing the platform for the        */
   1.730 +  /*                   following encoding ID.  This comes directly from    */
   1.731 +  /*                   the TrueType specification and should be emulated   */
   1.732 +  /*                   for other formats.                                  */
   1.733 +  /*                                                                       */
   1.734 +  /*    encoding_id :: A platform specific encoding number.  This also     */
   1.735 +  /*                   comes from the TrueType specification and should be */
   1.736 +  /*                   emulated similarly.                                 */
   1.737 +  /*                                                                       */
   1.738 +  typedef struct  FT_CharMapRec_
   1.739 +  {
   1.740 +    FT_Face      face;
   1.741 +    FT_Encoding  encoding;
   1.742 +    FT_UShort    platform_id;
   1.743 +    FT_UShort    encoding_id;
   1.744 +
   1.745 +  } FT_CharMapRec;
   1.746 +
   1.747 +
   1.748 +  /*************************************************************************/
   1.749 +  /*************************************************************************/
   1.750 +  /*                                                                       */
   1.751 +  /*                 B A S E   O B J E C T   C L A S S E S                 */
   1.752 +  /*                                                                       */
   1.753 +  /*************************************************************************/
   1.754 +  /*************************************************************************/
   1.755 +
   1.756 +
   1.757 +  /*************************************************************************/
   1.758 +  /*                                                                       */
   1.759 +  /* <Type>                                                                */
   1.760 +  /*    FT_Face_Internal                                                   */
   1.761 +  /*                                                                       */
   1.762 +  /* <Description>                                                         */
   1.763 +  /*    An opaque handle to an `FT_Face_InternalRec' structure, used to    */
   1.764 +  /*    model private data of a given @FT_Face object.                     */
   1.765 +  /*                                                                       */
   1.766 +  /*    This structure might change between releases of FreeType~2 and is  */
   1.767 +  /*    not generally available to client applications.                    */
   1.768 +  /*                                                                       */
   1.769 +  typedef struct FT_Face_InternalRec_*  FT_Face_Internal;
   1.770 +
   1.771 +
   1.772 +  /*************************************************************************/
   1.773 +  /*                                                                       */
   1.774 +  /* <Struct>                                                              */
   1.775 +  /*    FT_FaceRec                                                         */
   1.776 +  /*                                                                       */
   1.777 +  /* <Description>                                                         */
   1.778 +  /*    FreeType root face class structure.  A face object models a        */
   1.779 +  /*    typeface in a font file.                                           */
   1.780 +  /*                                                                       */
   1.781 +  /* <Fields>                                                              */
   1.782 +  /*    num_faces           :: The number of faces in the font file.  Some */
   1.783 +  /*                           font formats can have multiple faces in     */
   1.784 +  /*                           a font file.                                */
   1.785 +  /*                                                                       */
   1.786 +  /*    face_index          :: The index of the face in the font file.  It */
   1.787 +  /*                           is set to~0 if there is only one face in    */
   1.788 +  /*                           the font file.                              */
   1.789 +  /*                                                                       */
   1.790 +  /*    face_flags          :: A set of bit flags that give important      */
   1.791 +  /*                           information about the face; see             */
   1.792 +  /*                           @FT_FACE_FLAG_XXX for the details.          */
   1.793 +  /*                                                                       */
   1.794 +  /*    style_flags         :: A set of bit flags indicating the style of  */
   1.795 +  /*                           the face; see @FT_STYLE_FLAG_XXX for the    */
   1.796 +  /*                           details.                                    */
   1.797 +  /*                                                                       */
   1.798 +  /*    num_glyphs          :: The number of glyphs in the face.  If the   */
   1.799 +  /*                           face is scalable and has sbits (see         */
   1.800 +  /*                           `num_fixed_sizes'), it is set to the number */
   1.801 +  /*                           of outline glyphs.                          */
   1.802 +  /*                                                                       */
   1.803 +  /*                           For CID-keyed fonts, this value gives the   */
   1.804 +  /*                           highest CID used in the font.               */
   1.805 +  /*                                                                       */
   1.806 +  /*    family_name         :: The face's family name.  This is an ASCII   */
   1.807 +  /*                           string, usually in English, which describes */
   1.808 +  /*                           the typeface's family (like `Times New      */
   1.809 +  /*                           Roman', `Bodoni', `Garamond', etc).  This   */
   1.810 +  /*                           is a least common denominator used to list  */
   1.811 +  /*                           fonts.  Some formats (TrueType & OpenType)  */
   1.812 +  /*                           provide localized and Unicode versions of   */
   1.813 +  /*                           this string.  Applications should use the   */
   1.814 +  /*                           format specific interface to access them.   */
   1.815 +  /*                           Can be NULL (e.g., in fonts embedded in a   */
   1.816 +  /*                           PDF file).                                  */
   1.817 +  /*                                                                       */
   1.818 +  /*    style_name          :: The face's style name.  This is an ASCII    */
   1.819 +  /*                           string, usually in English, which describes */
   1.820 +  /*                           the typeface's style (like `Italic',        */
   1.821 +  /*                           `Bold', `Condensed', etc).  Not all font    */
   1.822 +  /*                           formats provide a style name, so this field */
   1.823 +  /*                           is optional, and can be set to NULL.  As    */
   1.824 +  /*                           for `family_name', some formats provide     */
   1.825 +  /*                           localized and Unicode versions of this      */
   1.826 +  /*                           string.  Applications should use the format */
   1.827 +  /*                           specific interface to access them.          */
   1.828 +  /*                                                                       */
   1.829 +  /*    num_fixed_sizes     :: The number of bitmap strikes in the face.   */
   1.830 +  /*                           Even if the face is scalable, there might   */
   1.831 +  /*                           still be bitmap strikes, which are called   */
   1.832 +  /*                           `sbits' in that case.                       */
   1.833 +  /*                                                                       */
   1.834 +  /*    available_sizes     :: An array of @FT_Bitmap_Size for all bitmap  */
   1.835 +  /*                           strikes in the face.  It is set to NULL if  */
   1.836 +  /*                           there is no bitmap strike.                  */
   1.837 +  /*                                                                       */
   1.838 +  /*    num_charmaps        :: The number of charmaps in the face.         */
   1.839 +  /*                                                                       */
   1.840 +  /*    charmaps            :: An array of the charmaps of the face.       */
   1.841 +  /*                                                                       */
   1.842 +  /*    generic             :: A field reserved for client uses.  See the  */
   1.843 +  /*                           @FT_Generic type description.               */
   1.844 +  /*                                                                       */
   1.845 +  /*    bbox                :: The font bounding box.  Coordinates are     */
   1.846 +  /*                           expressed in font units (see                */
   1.847 +  /*                           `units_per_EM').  The box is large enough   */
   1.848 +  /*                           to contain any glyph from the font.  Thus,  */
   1.849 +  /*                           `bbox.yMax' can be seen as the `maximal     */
   1.850 +  /*                           ascender', and `bbox.yMin' as the `minimal  */
   1.851 +  /*                           descender'.  Only relevant for scalable     */
   1.852 +  /*                           formats.                                    */
   1.853 +  /*                                                                       */
   1.854 +  /*                           Note that the bounding box might be off by  */
   1.855 +  /*                           (at least) one pixel for hinted fonts.  See */
   1.856 +  /*                           @FT_Size_Metrics for further discussion.    */
   1.857 +  /*                                                                       */
   1.858 +  /*    units_per_EM        :: The number of font units per EM square for  */
   1.859 +  /*                           this face.  This is typically 2048 for      */
   1.860 +  /*                           TrueType fonts, and 1000 for Type~1 fonts.  */
   1.861 +  /*                           Only relevant for scalable formats.         */
   1.862 +  /*                                                                       */
   1.863 +  /*    ascender            :: The typographic ascender of the face,       */
   1.864 +  /*                           expressed in font units.  For font formats  */
   1.865 +  /*                           not having this information, it is set to   */
   1.866 +  /*                           `bbox.yMax'.  Only relevant for scalable    */
   1.867 +  /*                           formats.                                    */
   1.868 +  /*                                                                       */
   1.869 +  /*    descender           :: The typographic descender of the face,      */
   1.870 +  /*                           expressed in font units.  For font formats  */
   1.871 +  /*                           not having this information, it is set to   */
   1.872 +  /*                           `bbox.yMin'.  Note that this field is       */
   1.873 +  /*                           usually negative.  Only relevant for        */
   1.874 +  /*                           scalable formats.                           */
   1.875 +  /*                                                                       */
   1.876 +  /*    height              :: The height is the vertical distance         */
   1.877 +  /*                           between two consecutive baselines,          */
   1.878 +  /*                           expressed in font units.  It is always      */
   1.879 +  /*                           positive.  Only relevant for scalable       */
   1.880 +  /*                           formats.                                    */
   1.881 +  /*                                                                       */
   1.882 +  /*    max_advance_width   :: The maximal advance width, in font units,   */
   1.883 +  /*                           for all glyphs in this face.  This can be   */
   1.884 +  /*                           used to make word wrapping computations     */
   1.885 +  /*                           faster.  Only relevant for scalable         */
   1.886 +  /*                           formats.                                    */
   1.887 +  /*                                                                       */
   1.888 +  /*    max_advance_height  :: The maximal advance height, in font units,  */
   1.889 +  /*                           for all glyphs in this face.  This is only  */
   1.890 +  /*                           relevant for vertical layouts, and is set   */
   1.891 +  /*                           to `height' for fonts that do not provide   */
   1.892 +  /*                           vertical metrics.  Only relevant for        */
   1.893 +  /*                           scalable formats.                           */
   1.894 +  /*                                                                       */
   1.895 +  /*    underline_position  :: The position, in font units, of the         */
   1.896 +  /*                           underline line for this face.  It is the    */
   1.897 +  /*                           center of the underlining stem.  Only       */
   1.898 +  /*                           relevant for scalable formats.              */
   1.899 +  /*                                                                       */
   1.900 +  /*    underline_thickness :: The thickness, in font units, of the        */
   1.901 +  /*                           underline for this face.  Only relevant for */
   1.902 +  /*                           scalable formats.                           */
   1.903 +  /*                                                                       */
   1.904 +  /*    glyph               :: The face's associated glyph slot(s).        */
   1.905 +  /*                                                                       */
   1.906 +  /*    size                :: The current active size for this face.      */
   1.907 +  /*                                                                       */
   1.908 +  /*    charmap             :: The current active charmap for this face.   */
   1.909 +  /*                                                                       */
   1.910 +  /* <Note>                                                                */
   1.911 +  /*    Fields may be changed after a call to @FT_Attach_File or           */
   1.912 +  /*    @FT_Attach_Stream.                                                 */
   1.913 +  /*                                                                       */
   1.914 +  typedef struct  FT_FaceRec_
   1.915 +  {
   1.916 +    FT_Long           num_faces;
   1.917 +    FT_Long           face_index;
   1.918 +
   1.919 +    FT_Long           face_flags;
   1.920 +    FT_Long           style_flags;
   1.921 +
   1.922 +    FT_Long           num_glyphs;
   1.923 +
   1.924 +    FT_String*        family_name;
   1.925 +    FT_String*        style_name;
   1.926 +
   1.927 +    FT_Int            num_fixed_sizes;
   1.928 +    FT_Bitmap_Size*   available_sizes;
   1.929 +
   1.930 +    FT_Int            num_charmaps;
   1.931 +    FT_CharMap*       charmaps;
   1.932 +
   1.933 +    FT_Generic        generic;
   1.934 +
   1.935 +    /*# The following member variables (down to `underline_thickness') */
   1.936 +    /*# are only relevant to scalable outlines; cf. @FT_Bitmap_Size    */
   1.937 +    /*# for bitmap fonts.                                              */
   1.938 +    FT_BBox           bbox;
   1.939 +
   1.940 +    FT_UShort         units_per_EM;
   1.941 +    FT_Short          ascender;
   1.942 +    FT_Short          descender;
   1.943 +    FT_Short          height;
   1.944 +
   1.945 +    FT_Short          max_advance_width;
   1.946 +    FT_Short          max_advance_height;
   1.947 +
   1.948 +    FT_Short          underline_position;
   1.949 +    FT_Short          underline_thickness;
   1.950 +
   1.951 +    FT_GlyphSlot      glyph;
   1.952 +    FT_Size           size;
   1.953 +    FT_CharMap        charmap;
   1.954 +
   1.955 +    /*@private begin */
   1.956 +
   1.957 +    FT_Driver         driver;
   1.958 +    FT_Memory         memory;
   1.959 +    FT_Stream         stream;
   1.960 +
   1.961 +    FT_ListRec        sizes_list;
   1.962 +
   1.963 +    FT_Generic        autohint;
   1.964 +    void*             extensions;
   1.965 +
   1.966 +    FT_Face_Internal  internal;
   1.967 +
   1.968 +    /*@private end */
   1.969 +
   1.970 +  } FT_FaceRec;
   1.971 +
   1.972 +
   1.973 +  /*************************************************************************/
   1.974 +  /*                                                                       */
   1.975 +  /* <Enum>                                                                */
   1.976 +  /*    FT_FACE_FLAG_XXX                                                   */
   1.977 +  /*                                                                       */
   1.978 +  /* <Description>                                                         */
   1.979 +  /*    A list of bit flags used in the `face_flags' field of the          */
   1.980 +  /*    @FT_FaceRec structure.  They inform client applications of         */
   1.981 +  /*    properties of the corresponding face.                              */
   1.982 +  /*                                                                       */
   1.983 +  /* <Values>                                                              */
   1.984 +  /*    FT_FACE_FLAG_SCALABLE ::                                           */
   1.985 +  /*      Indicates that the face contains outline glyphs.  This doesn't   */
   1.986 +  /*      prevent bitmap strikes, i.e., a face can have both this and      */
   1.987 +  /*      and @FT_FACE_FLAG_FIXED_SIZES set.                               */
   1.988 +  /*                                                                       */
   1.989 +  /*    FT_FACE_FLAG_FIXED_SIZES ::                                        */
   1.990 +  /*      Indicates that the face contains bitmap strikes.  See also the   */
   1.991 +  /*      `num_fixed_sizes' and `available_sizes' fields of @FT_FaceRec.   */
   1.992 +  /*                                                                       */
   1.993 +  /*    FT_FACE_FLAG_FIXED_WIDTH ::                                        */
   1.994 +  /*      Indicates that the face contains fixed-width characters (like    */
   1.995 +  /*      Courier, Lucido, MonoType, etc.).                                */
   1.996 +  /*                                                                       */
   1.997 +  /*    FT_FACE_FLAG_SFNT ::                                               */
   1.998 +  /*      Indicates that the face uses the `sfnt' storage scheme.  For     */
   1.999 +  /*      now, this means TrueType and OpenType.                           */
  1.1000 +  /*                                                                       */
  1.1001 +  /*    FT_FACE_FLAG_HORIZONTAL ::                                         */
  1.1002 +  /*      Indicates that the face contains horizontal glyph metrics.  This */
  1.1003 +  /*      should be set for all common formats.                            */
  1.1004 +  /*                                                                       */
  1.1005 +  /*    FT_FACE_FLAG_VERTICAL ::                                           */
  1.1006 +  /*      Indicates that the face contains vertical glyph metrics.  This   */
  1.1007 +  /*      is only available in some formats, not all of them.              */
  1.1008 +  /*                                                                       */
  1.1009 +  /*    FT_FACE_FLAG_KERNING ::                                            */
  1.1010 +  /*      Indicates that the face contains kerning information.  If set,   */
  1.1011 +  /*      the kerning distance can be retrieved through the function       */
  1.1012 +  /*      @FT_Get_Kerning.  Otherwise the function always return the       */
  1.1013 +  /*      vector (0,0).  Note that FreeType doesn't handle kerning data    */
  1.1014 +  /*      from the `GPOS' table (as present in some OpenType fonts).       */
  1.1015 +  /*                                                                       */
  1.1016 +  /*    FT_FACE_FLAG_FAST_GLYPHS ::                                        */
  1.1017 +  /*      THIS FLAG IS DEPRECATED.  DO NOT USE OR TEST IT.                 */
  1.1018 +  /*                                                                       */
  1.1019 +  /*    FT_FACE_FLAG_MULTIPLE_MASTERS ::                                   */
  1.1020 +  /*      Indicates that the font contains multiple masters and is capable */
  1.1021 +  /*      of interpolating between them.  See the multiple-masters         */
  1.1022 +  /*      specific API for details.                                        */
  1.1023 +  /*                                                                       */
  1.1024 +  /*    FT_FACE_FLAG_GLYPH_NAMES ::                                        */
  1.1025 +  /*      Indicates that the font contains glyph names that can be         */
  1.1026 +  /*      retrieved through @FT_Get_Glyph_Name.  Note that some TrueType   */
  1.1027 +  /*      fonts contain broken glyph name tables.  Use the function        */
  1.1028 +  /*      @FT_Has_PS_Glyph_Names when needed.                              */
  1.1029 +  /*                                                                       */
  1.1030 +  /*    FT_FACE_FLAG_EXTERNAL_STREAM ::                                    */
  1.1031 +  /*      Used internally by FreeType to indicate that a face's stream was */
  1.1032 +  /*      provided by the client application and should not be destroyed   */
  1.1033 +  /*      when @FT_Done_Face is called.  Don't read or test this flag.     */
  1.1034 +  /*                                                                       */
  1.1035 +  /*    FT_FACE_FLAG_HINTER ::                                             */
  1.1036 +  /*      Set if the font driver has a hinting machine of its own.  For    */
  1.1037 +  /*      example, with TrueType fonts, it makes sense to use data from    */
  1.1038 +  /*      the SFNT `gasp' table only if the native TrueType hinting engine */
  1.1039 +  /*      (with the bytecode interpreter) is available and active.         */
  1.1040 +  /*                                                                       */
  1.1041 +  /*    FT_FACE_FLAG_CID_KEYED ::                                          */
  1.1042 +  /*      Set if the font is CID-keyed.  In that case, the font is not     */
  1.1043 +  /*      accessed by glyph indices but by CID values.  For subsetted      */
  1.1044 +  /*      CID-keyed fonts this has the consequence that not all index      */
  1.1045 +  /*      values are a valid argument to FT_Load_Glyph.  Only the CID      */
  1.1046 +  /*      values for which corresponding glyphs in the subsetted font      */
  1.1047 +  /*      exist make FT_Load_Glyph return successfully; in all other cases */
  1.1048 +  /*      you get an `FT_Err_Invalid_Argument' error.                      */
  1.1049 +  /*                                                                       */
  1.1050 +  /*      Note that CID-keyed fonts which are in an SFNT wrapper don't     */
  1.1051 +  /*      have this flag set since the glyphs are accessed in the normal   */
  1.1052 +  /*      way (using contiguous indices); the `CID-ness' isn't visible to  */
  1.1053 +  /*      the application.                                                 */
  1.1054 +  /*                                                                       */
  1.1055 +  /*    FT_FACE_FLAG_TRICKY ::                                             */
  1.1056 +  /*      Set if the font is `tricky', this is, it always needs the        */
  1.1057 +  /*      font format's native hinting engine to get a reasonable result.  */
  1.1058 +  /*      A typical example is the Chinese font `mingli.ttf' which uses    */
  1.1059 +  /*      TrueType bytecode instructions to move and scale all of its      */
  1.1060 +  /*      subglyphs.                                                       */
  1.1061 +  /*                                                                       */
  1.1062 +  /*      It is not possible to autohint such fonts using                  */
  1.1063 +  /*      @FT_LOAD_FORCE_AUTOHINT; it will also ignore                     */
  1.1064 +  /*      @FT_LOAD_NO_HINTING.  You have to set both FT_LOAD_NO_HINTING    */
  1.1065 +  /*      and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */
  1.1066 +  /*      probably never want this except for demonstration purposes.      */
  1.1067 +  /*                                                                       */
  1.1068 +  /*      Currently, there are six TrueType fonts in the list of tricky    */
  1.1069 +  /*      fonts; they are hard-coded in file `ttobjs.c'.                   */
  1.1070 +  /*                                                                       */
  1.1071 +#define FT_FACE_FLAG_SCALABLE          ( 1L <<  0 )
  1.1072 +#define FT_FACE_FLAG_FIXED_SIZES       ( 1L <<  1 )
  1.1073 +#define FT_FACE_FLAG_FIXED_WIDTH       ( 1L <<  2 )
  1.1074 +#define FT_FACE_FLAG_SFNT              ( 1L <<  3 )
  1.1075 +#define FT_FACE_FLAG_HORIZONTAL        ( 1L <<  4 )
  1.1076 +#define FT_FACE_FLAG_VERTICAL          ( 1L <<  5 )
  1.1077 +#define FT_FACE_FLAG_KERNING           ( 1L <<  6 )
  1.1078 +#define FT_FACE_FLAG_FAST_GLYPHS       ( 1L <<  7 )
  1.1079 +#define FT_FACE_FLAG_MULTIPLE_MASTERS  ( 1L <<  8 )
  1.1080 +#define FT_FACE_FLAG_GLYPH_NAMES       ( 1L <<  9 )
  1.1081 +#define FT_FACE_FLAG_EXTERNAL_STREAM   ( 1L << 10 )
  1.1082 +#define FT_FACE_FLAG_HINTER            ( 1L << 11 )
  1.1083 +#define FT_FACE_FLAG_CID_KEYED         ( 1L << 12 )
  1.1084 +#define FT_FACE_FLAG_TRICKY            ( 1L << 13 )
  1.1085 +
  1.1086 +
  1.1087 +  /*************************************************************************
  1.1088 +   *
  1.1089 +   * @macro:
  1.1090 +   *   FT_HAS_HORIZONTAL( face )
  1.1091 +   *
  1.1092 +   * @description:
  1.1093 +   *   A macro that returns true whenever a face object contains
  1.1094 +   *   horizontal metrics (this is true for all font formats though).
  1.1095 +   *
  1.1096 +   * @also:
  1.1097 +   *   @FT_HAS_VERTICAL can be used to check for vertical metrics.
  1.1098 +   *
  1.1099 +   */
  1.1100 +#define FT_HAS_HORIZONTAL( face ) \
  1.1101 +          ( face->face_flags & FT_FACE_FLAG_HORIZONTAL )
  1.1102 +
  1.1103 +
  1.1104 +  /*************************************************************************
  1.1105 +   *
  1.1106 +   * @macro:
  1.1107 +   *   FT_HAS_VERTICAL( face )
  1.1108 +   *
  1.1109 +   * @description:
  1.1110 +   *   A macro that returns true whenever a face object contains vertical
  1.1111 +   *   metrics.
  1.1112 +   *
  1.1113 +   */
  1.1114 +#define FT_HAS_VERTICAL( face ) \
  1.1115 +          ( face->face_flags & FT_FACE_FLAG_VERTICAL )
  1.1116 +
  1.1117 +
  1.1118 +  /*************************************************************************
  1.1119 +   *
  1.1120 +   * @macro:
  1.1121 +   *   FT_HAS_KERNING( face )
  1.1122 +   *
  1.1123 +   * @description:
  1.1124 +   *   A macro that returns true whenever a face object contains kerning
  1.1125 +   *   data that can be accessed with @FT_Get_Kerning.
  1.1126 +   *
  1.1127 +   */
  1.1128 +#define FT_HAS_KERNING( face ) \
  1.1129 +          ( face->face_flags & FT_FACE_FLAG_KERNING )
  1.1130 +
  1.1131 +
  1.1132 +  /*************************************************************************
  1.1133 +   *
  1.1134 +   * @macro:
  1.1135 +   *   FT_IS_SCALABLE( face )
  1.1136 +   *
  1.1137 +   * @description:
  1.1138 +   *   A macro that returns true whenever a face object contains a scalable
  1.1139 +   *   font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF,
  1.1140 +   *   and PFR font formats.
  1.1141 +   *
  1.1142 +   */
  1.1143 +#define FT_IS_SCALABLE( face ) \
  1.1144 +          ( face->face_flags & FT_FACE_FLAG_SCALABLE )
  1.1145 +
  1.1146 +
  1.1147 +  /*************************************************************************
  1.1148 +   *
  1.1149 +   * @macro:
  1.1150 +   *   FT_IS_SFNT( face )
  1.1151 +   *
  1.1152 +   * @description:
  1.1153 +   *   A macro that returns true whenever a face object contains a font
  1.1154 +   *   whose format is based on the SFNT storage scheme.  This usually
  1.1155 +   *   means: TrueType fonts, OpenType fonts, as well as SFNT-based embedded
  1.1156 +   *   bitmap fonts.
  1.1157 +   *
  1.1158 +   *   If this macro is true, all functions defined in @FT_SFNT_NAMES_H and
  1.1159 +   *   @FT_TRUETYPE_TABLES_H are available.
  1.1160 +   *
  1.1161 +   */
  1.1162 +#define FT_IS_SFNT( face ) \
  1.1163 +          ( face->face_flags & FT_FACE_FLAG_SFNT )
  1.1164 +
  1.1165 +
  1.1166 +  /*************************************************************************
  1.1167 +   *
  1.1168 +   * @macro:
  1.1169 +   *   FT_IS_FIXED_WIDTH( face )
  1.1170 +   *
  1.1171 +   * @description:
  1.1172 +   *   A macro that returns true whenever a face object contains a font face
  1.1173 +   *   that contains fixed-width (or `monospace', `fixed-pitch', etc.)
  1.1174 +   *   glyphs.
  1.1175 +   *
  1.1176 +   */
  1.1177 +#define FT_IS_FIXED_WIDTH( face ) \
  1.1178 +          ( face->face_flags & FT_FACE_FLAG_FIXED_WIDTH )
  1.1179 +
  1.1180 +
  1.1181 +  /*************************************************************************
  1.1182 +   *
  1.1183 +   * @macro:
  1.1184 +   *   FT_HAS_FIXED_SIZES( face )
  1.1185 +   *
  1.1186 +   * @description:
  1.1187 +   *   A macro that returns true whenever a face object contains some
  1.1188 +   *   embedded bitmaps.  See the `available_sizes' field of the
  1.1189 +   *   @FT_FaceRec structure.
  1.1190 +   *
  1.1191 +   */
  1.1192 +#define FT_HAS_FIXED_SIZES( face ) \
  1.1193 +          ( face->face_flags & FT_FACE_FLAG_FIXED_SIZES )
  1.1194 +
  1.1195 +
  1.1196 +  /*************************************************************************
  1.1197 +   *
  1.1198 +   * @macro:
  1.1199 +   *   FT_HAS_FAST_GLYPHS( face )
  1.1200 +   *
  1.1201 +   * @description:
  1.1202 +   *   Deprecated.
  1.1203 +   *
  1.1204 +   */
  1.1205 +#define FT_HAS_FAST_GLYPHS( face )  0
  1.1206 +
  1.1207 +
  1.1208 +  /*************************************************************************
  1.1209 +   *
  1.1210 +   * @macro:
  1.1211 +   *   FT_HAS_GLYPH_NAMES( face )
  1.1212 +   *
  1.1213 +   * @description:
  1.1214 +   *   A macro that returns true whenever a face object contains some glyph
  1.1215 +   *   names that can be accessed through @FT_Get_Glyph_Name.
  1.1216 +   *
  1.1217 +   */
  1.1218 +#define FT_HAS_GLYPH_NAMES( face ) \
  1.1219 +          ( face->face_flags & FT_FACE_FLAG_GLYPH_NAMES )
  1.1220 +
  1.1221 +
  1.1222 +  /*************************************************************************
  1.1223 +   *
  1.1224 +   * @macro:
  1.1225 +   *   FT_HAS_MULTIPLE_MASTERS( face )
  1.1226 +   *
  1.1227 +   * @description:
  1.1228 +   *   A macro that returns true whenever a face object contains some
  1.1229 +   *   multiple masters.  The functions provided by @FT_MULTIPLE_MASTERS_H
  1.1230 +   *   are then available to choose the exact design you want.
  1.1231 +   *
  1.1232 +   */
  1.1233 +#define FT_HAS_MULTIPLE_MASTERS( face ) \
  1.1234 +          ( face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS )
  1.1235 +
  1.1236 +
  1.1237 +  /*************************************************************************
  1.1238 +   *
  1.1239 +   * @macro:
  1.1240 +   *   FT_IS_CID_KEYED( face )
  1.1241 +   *
  1.1242 +   * @description:
  1.1243 +   *   A macro that returns true whenever a face object contains a CID-keyed
  1.1244 +   *   font.  See the discussion of @FT_FACE_FLAG_CID_KEYED for more
  1.1245 +   *   details.
  1.1246 +   *
  1.1247 +   *   If this macro is true, all functions defined in @FT_CID_H are
  1.1248 +   *   available.
  1.1249 +   *
  1.1250 +   */
  1.1251 +#define FT_IS_CID_KEYED( face ) \
  1.1252 +          ( face->face_flags & FT_FACE_FLAG_CID_KEYED )
  1.1253 +
  1.1254 +
  1.1255 +  /*************************************************************************
  1.1256 +   *
  1.1257 +   * @macro:
  1.1258 +   *   FT_IS_TRICKY( face )
  1.1259 +   *
  1.1260 +   * @description:
  1.1261 +   *   A macro that returns true whenever a face represents a `tricky' font.
  1.1262 +   *   See the discussion of @FT_FACE_FLAG_TRICKY for more details.
  1.1263 +   *
  1.1264 +   */
  1.1265 +#define FT_IS_TRICKY( face ) \
  1.1266 +          ( face->face_flags & FT_FACE_FLAG_TRICKY )
  1.1267 +
  1.1268 +
  1.1269 +  /*************************************************************************/
  1.1270 +  /*                                                                       */
  1.1271 +  /* <Const>                                                               */
  1.1272 +  /*    FT_STYLE_FLAG_XXX                                                  */
  1.1273 +  /*                                                                       */
  1.1274 +  /* <Description>                                                         */
  1.1275 +  /*    A list of bit-flags used to indicate the style of a given face.    */
  1.1276 +  /*    These are used in the `style_flags' field of @FT_FaceRec.          */
  1.1277 +  /*                                                                       */
  1.1278 +  /* <Values>                                                              */
  1.1279 +  /*    FT_STYLE_FLAG_ITALIC ::                                            */
  1.1280 +  /*      Indicates that a given face style is italic or oblique.          */
  1.1281 +  /*                                                                       */
  1.1282 +  /*    FT_STYLE_FLAG_BOLD ::                                              */
  1.1283 +  /*      Indicates that a given face is bold.                             */
  1.1284 +  /*                                                                       */
  1.1285 +  /* <Note>                                                                */
  1.1286 +  /*    The style information as provided by FreeType is very basic.  More */
  1.1287 +  /*    details are beyond the scope and should be done on a higher level  */
  1.1288 +  /*    (for example, by analyzing various fields of the `OS/2' table in   */
  1.1289 +  /*    SFNT based fonts).                                                 */
  1.1290 +  /*                                                                       */
  1.1291 +#define FT_STYLE_FLAG_ITALIC  ( 1 << 0 )
  1.1292 +#define FT_STYLE_FLAG_BOLD    ( 1 << 1 )
  1.1293 +
  1.1294 +
  1.1295 +  /*************************************************************************/
  1.1296 +  /*                                                                       */
  1.1297 +  /* <Type>                                                                */
  1.1298 +  /*    FT_Size_Internal                                                   */
  1.1299 +  /*                                                                       */
  1.1300 +  /* <Description>                                                         */
  1.1301 +  /*    An opaque handle to an `FT_Size_InternalRec' structure, used to    */
  1.1302 +  /*    model private data of a given @FT_Size object.                     */
  1.1303 +  /*                                                                       */
  1.1304 +  typedef struct FT_Size_InternalRec_*  FT_Size_Internal;
  1.1305 +
  1.1306 +
  1.1307 +  /*************************************************************************/
  1.1308 +  /*                                                                       */
  1.1309 +  /* <Struct>                                                              */
  1.1310 +  /*    FT_Size_Metrics                                                    */
  1.1311 +  /*                                                                       */
  1.1312 +  /* <Description>                                                         */
  1.1313 +  /*    The size metrics structure gives the metrics of a size object.     */
  1.1314 +  /*                                                                       */
  1.1315 +  /* <Fields>                                                              */
  1.1316 +  /*    x_ppem       :: The width of the scaled EM square in pixels, hence */
  1.1317 +  /*                    the term `ppem' (pixels per EM).  It is also       */
  1.1318 +  /*                    referred to as `nominal width'.                    */
  1.1319 +  /*                                                                       */
  1.1320 +  /*    y_ppem       :: The height of the scaled EM square in pixels,      */
  1.1321 +  /*                    hence the term `ppem' (pixels per EM).  It is also */
  1.1322 +  /*                    referred to as `nominal height'.                   */
  1.1323 +  /*                                                                       */
  1.1324 +  /*    x_scale      :: A 16.16 fractional scaling value used to convert   */
  1.1325 +  /*                    horizontal metrics from font units to 26.6         */
  1.1326 +  /*                    fractional pixels.  Only relevant for scalable     */
  1.1327 +  /*                    font formats.                                      */
  1.1328 +  /*                                                                       */
  1.1329 +  /*    y_scale      :: A 16.16 fractional scaling value used to convert   */
  1.1330 +  /*                    vertical metrics from font units to 26.6           */
  1.1331 +  /*                    fractional pixels.  Only relevant for scalable     */
  1.1332 +  /*                    font formats.                                      */
  1.1333 +  /*                                                                       */
  1.1334 +  /*    ascender     :: The ascender in 26.6 fractional pixels.  See       */
  1.1335 +  /*                    @FT_FaceRec for the details.                       */
  1.1336 +  /*                                                                       */
  1.1337 +  /*    descender    :: The descender in 26.6 fractional pixels.  See      */
  1.1338 +  /*                    @FT_FaceRec for the details.                       */
  1.1339 +  /*                                                                       */
  1.1340 +  /*    height       :: The height in 26.6 fractional pixels.  See         */
  1.1341 +  /*                    @FT_FaceRec for the details.                       */
  1.1342 +  /*                                                                       */
  1.1343 +  /*    max_advance  :: The maximal advance width in 26.6 fractional       */
  1.1344 +  /*                    pixels.  See @FT_FaceRec for the details.          */
  1.1345 +  /*                                                                       */
  1.1346 +  /* <Note>                                                                */
  1.1347 +  /*    The scaling values, if relevant, are determined first during a     */
  1.1348 +  /*    size changing operation.  The remaining fields are then set by the */
  1.1349 +  /*    driver.  For scalable formats, they are usually set to scaled      */
  1.1350 +  /*    values of the corresponding fields in @FT_FaceRec.                 */
  1.1351 +  /*                                                                       */
  1.1352 +  /*    Note that due to glyph hinting, these values might not be exact    */
  1.1353 +  /*    for certain fonts.  Thus they must be treated as unreliable        */
  1.1354 +  /*    with an error margin of at least one pixel!                        */
  1.1355 +  /*                                                                       */
  1.1356 +  /*    Indeed, the only way to get the exact metrics is to render _all_   */
  1.1357 +  /*    glyphs.  As this would be a definite performance hit, it is up to  */
  1.1358 +  /*    client applications to perform such computations.                  */
  1.1359 +  /*                                                                       */
  1.1360 +  /*    The FT_Size_Metrics structure is valid for bitmap fonts also.      */
  1.1361 +  /*                                                                       */
  1.1362 +  typedef struct  FT_Size_Metrics_
  1.1363 +  {
  1.1364 +    FT_UShort  x_ppem;      /* horizontal pixels per EM               */
  1.1365 +    FT_UShort  y_ppem;      /* vertical pixels per EM                 */
  1.1366 +
  1.1367 +    FT_Fixed   x_scale;     /* scaling values used to convert font    */
  1.1368 +    FT_Fixed   y_scale;     /* units to 26.6 fractional pixels        */
  1.1369 +
  1.1370 +    FT_Pos     ascender;    /* ascender in 26.6 frac. pixels          */
  1.1371 +    FT_Pos     descender;   /* descender in 26.6 frac. pixels         */
  1.1372 +    FT_Pos     height;      /* text height in 26.6 frac. pixels       */
  1.1373 +    FT_Pos     max_advance; /* max horizontal advance, in 26.6 pixels */
  1.1374 +
  1.1375 +  } FT_Size_Metrics;
  1.1376 +
  1.1377 +
  1.1378 +  /*************************************************************************/
  1.1379 +  /*                                                                       */
  1.1380 +  /* <Struct>                                                              */
  1.1381 +  /*    FT_SizeRec                                                         */
  1.1382 +  /*                                                                       */
  1.1383 +  /* <Description>                                                         */
  1.1384 +  /*    FreeType root size class structure.  A size object models a face   */
  1.1385 +  /*    object at a given size.                                            */
  1.1386 +  /*                                                                       */
  1.1387 +  /* <Fields>                                                              */
  1.1388 +  /*    face    :: Handle to the parent face object.                       */
  1.1389 +  /*                                                                       */
  1.1390 +  /*    generic :: A typeless pointer, which is unused by the FreeType     */
  1.1391 +  /*               library or any of its drivers.  It can be used by       */
  1.1392 +  /*               client applications to link their own data to each size */
  1.1393 +  /*               object.                                                 */
  1.1394 +  /*                                                                       */
  1.1395 +  /*    metrics :: Metrics for this size object.  This field is read-only. */
  1.1396 +  /*                                                                       */
  1.1397 +  typedef struct  FT_SizeRec_
  1.1398 +  {
  1.1399 +    FT_Face           face;      /* parent face object              */
  1.1400 +    FT_Generic        generic;   /* generic pointer for client uses */
  1.1401 +    FT_Size_Metrics   metrics;   /* size metrics                    */
  1.1402 +    FT_Size_Internal  internal;
  1.1403 +
  1.1404 +  } FT_SizeRec;
  1.1405 +
  1.1406 +
  1.1407 +  /*************************************************************************/
  1.1408 +  /*                                                                       */
  1.1409 +  /* <Struct>                                                              */
  1.1410 +  /*    FT_SubGlyph                                                        */
  1.1411 +  /*                                                                       */
  1.1412 +  /* <Description>                                                         */
  1.1413 +  /*    The subglyph structure is an internal object used to describe      */
  1.1414 +  /*    subglyphs (for example, in the case of composites).                */
  1.1415 +  /*                                                                       */
  1.1416 +  /* <Note>                                                                */
  1.1417 +  /*    The subglyph implementation is not part of the high-level API,     */
  1.1418 +  /*    hence the forward structure declaration.                           */
  1.1419 +  /*                                                                       */
  1.1420 +  /*    You can however retrieve subglyph information with                 */
  1.1421 +  /*    @FT_Get_SubGlyph_Info.                                             */
  1.1422 +  /*                                                                       */
  1.1423 +  typedef struct FT_SubGlyphRec_*  FT_SubGlyph;
  1.1424 +
  1.1425 +
  1.1426 +  /*************************************************************************/
  1.1427 +  /*                                                                       */
  1.1428 +  /* <Type>                                                                */
  1.1429 +  /*    FT_Slot_Internal                                                   */
  1.1430 +  /*                                                                       */
  1.1431 +  /* <Description>                                                         */
  1.1432 +  /*    An opaque handle to an `FT_Slot_InternalRec' structure, used to    */
  1.1433 +  /*    model private data of a given @FT_GlyphSlot object.                */
  1.1434 +  /*                                                                       */
  1.1435 +  typedef struct FT_Slot_InternalRec_*  FT_Slot_Internal;
  1.1436 +
  1.1437 +
  1.1438 +  /*************************************************************************/
  1.1439 +  /*                                                                       */
  1.1440 +  /* <Struct>                                                              */
  1.1441 +  /*    FT_GlyphSlotRec                                                    */
  1.1442 +  /*                                                                       */
  1.1443 +  /* <Description>                                                         */
  1.1444 +  /*    FreeType root glyph slot class structure.  A glyph slot is a       */
  1.1445 +  /*    container where individual glyphs can be loaded, be they in        */
  1.1446 +  /*    outline or bitmap format.                                          */
  1.1447 +  /*                                                                       */
  1.1448 +  /* <Fields>                                                              */
  1.1449 +  /*    library           :: A handle to the FreeType library instance     */
  1.1450 +  /*                         this slot belongs to.                         */
  1.1451 +  /*                                                                       */
  1.1452 +  /*    face              :: A handle to the parent face object.           */
  1.1453 +  /*                                                                       */
  1.1454 +  /*    next              :: In some cases (like some font tools), several */
  1.1455 +  /*                         glyph slots per face object can be a good     */
  1.1456 +  /*                         thing.  As this is rare, the glyph slots are  */
  1.1457 +  /*                         listed through a direct, single-linked list   */
  1.1458 +  /*                         using its `next' field.                       */
  1.1459 +  /*                                                                       */
  1.1460 +  /*    generic           :: A typeless pointer which is unused by the     */
  1.1461 +  /*                         FreeType library or any of its drivers.  It   */
  1.1462 +  /*                         can be used by client applications to link    */
  1.1463 +  /*                         their own data to each glyph slot object.     */
  1.1464 +  /*                                                                       */
  1.1465 +  /*    metrics           :: The metrics of the last loaded glyph in the   */
  1.1466 +  /*                         slot.  The returned values depend on the last */
  1.1467 +  /*                         load flags (see the @FT_Load_Glyph API        */
  1.1468 +  /*                         function) and can be expressed either in 26.6 */
  1.1469 +  /*                         fractional pixels or font units.              */
  1.1470 +  /*                                                                       */
  1.1471 +  /*                         Note that even when the glyph image is        */
  1.1472 +  /*                         transformed, the metrics are not.             */
  1.1473 +  /*                                                                       */
  1.1474 +  /*    linearHoriAdvance :: The advance width of the unhinted glyph.      */
  1.1475 +  /*                         Its value is expressed in 16.16 fractional    */
  1.1476 +  /*                         pixels, unless @FT_LOAD_LINEAR_DESIGN is set  */
  1.1477 +  /*                         when loading the glyph.  This field can be    */
  1.1478 +  /*                         important to perform correct WYSIWYG layout.  */
  1.1479 +  /*                         Only relevant for outline glyphs.             */
  1.1480 +  /*                                                                       */
  1.1481 +  /*    linearVertAdvance :: The advance height of the unhinted glyph.     */
  1.1482 +  /*                         Its value is expressed in 16.16 fractional    */
  1.1483 +  /*                         pixels, unless @FT_LOAD_LINEAR_DESIGN is set  */
  1.1484 +  /*                         when loading the glyph.  This field can be    */
  1.1485 +  /*                         important to perform correct WYSIWYG layout.  */
  1.1486 +  /*                         Only relevant for outline glyphs.             */
  1.1487 +  /*                                                                       */
  1.1488 +  /*    advance           :: This shorthand is, depending on               */
  1.1489 +  /*                         @FT_LOAD_IGNORE_TRANSFORM, the transformed    */
  1.1490 +  /*                         advance width for the glyph (in 26.6          */
  1.1491 +  /*                         fractional pixel format).  As specified with  */
  1.1492 +  /*                         @FT_LOAD_VERTICAL_LAYOUT, it uses either the  */
  1.1493 +  /*                         `horiAdvance' or the `vertAdvance' value of   */
  1.1494 +  /*                         `metrics' field.                              */
  1.1495 +  /*                                                                       */
  1.1496 +  /*    format            :: This field indicates the format of the image  */
  1.1497 +  /*                         contained in the glyph slot.  Typically       */
  1.1498 +  /*                         @FT_GLYPH_FORMAT_BITMAP,                      */
  1.1499 +  /*                         @FT_GLYPH_FORMAT_OUTLINE, or                  */
  1.1500 +  /*                         @FT_GLYPH_FORMAT_COMPOSITE, but others are    */
  1.1501 +  /*                         possible.                                     */
  1.1502 +  /*                                                                       */
  1.1503 +  /*    bitmap            :: This field is used as a bitmap descriptor     */
  1.1504 +  /*                         when the slot format is                       */
  1.1505 +  /*                         @FT_GLYPH_FORMAT_BITMAP.  Note that the       */
  1.1506 +  /*                         address and content of the bitmap buffer can  */
  1.1507 +  /*                         change between calls of @FT_Load_Glyph and a  */
  1.1508 +  /*                         few other functions.                          */
  1.1509 +  /*                                                                       */
  1.1510 +  /*    bitmap_left       :: This is the bitmap's left bearing expressed   */
  1.1511 +  /*                         in integer pixels.  Of course, this is only   */
  1.1512 +  /*                         valid if the format is                        */
  1.1513 +  /*                         @FT_GLYPH_FORMAT_BITMAP.                      */
  1.1514 +  /*                                                                       */
  1.1515 +  /*    bitmap_top        :: This is the bitmap's top bearing expressed in */
  1.1516 +  /*                         integer pixels.  Remember that this is the    */
  1.1517 +  /*                         distance from the baseline to the top-most    */
  1.1518 +  /*                         glyph scanline, upwards y~coordinates being   */
  1.1519 +  /*                         *positive*.                                   */
  1.1520 +  /*                                                                       */
  1.1521 +  /*    outline           :: The outline descriptor for the current glyph  */
  1.1522 +  /*                         image if its format is                        */
  1.1523 +  /*                         @FT_GLYPH_FORMAT_OUTLINE.  Once a glyph is    */
  1.1524 +  /*                         loaded, `outline' can be transformed,         */
  1.1525 +  /*                         distorted, embolded, etc.  However, it must   */
  1.1526 +  /*                         not be freed.                                 */
  1.1527 +  /*                                                                       */
  1.1528 +  /*    num_subglyphs     :: The number of subglyphs in a composite glyph. */
  1.1529 +  /*                         This field is only valid for the composite    */
  1.1530 +  /*                         glyph format that should normally only be     */
  1.1531 +  /*                         loaded with the @FT_LOAD_NO_RECURSE flag.     */
  1.1532 +  /*                         For now this is internal to FreeType.         */
  1.1533 +  /*                                                                       */
  1.1534 +  /*    subglyphs         :: An array of subglyph descriptors for          */
  1.1535 +  /*                         composite glyphs.  There are `num_subglyphs'  */
  1.1536 +  /*                         elements in there.  Currently internal to     */
  1.1537 +  /*                         FreeType.                                     */
  1.1538 +  /*                                                                       */
  1.1539 +  /*    control_data      :: Certain font drivers can also return the      */
  1.1540 +  /*                         control data for a given glyph image (e.g.    */
  1.1541 +  /*                         TrueType bytecode, Type~1 charstrings, etc.). */
  1.1542 +  /*                         This field is a pointer to such data.         */
  1.1543 +  /*                                                                       */
  1.1544 +  /*    control_len       :: This is the length in bytes of the control    */
  1.1545 +  /*                         data.                                         */
  1.1546 +  /*                                                                       */
  1.1547 +  /*    other             :: Really wicked formats can use this pointer to */
  1.1548 +  /*                         present their own glyph image to client       */
  1.1549 +  /*                         applications.  Note that the application      */
  1.1550 +  /*                         needs to know about the image format.         */
  1.1551 +  /*                                                                       */
  1.1552 +  /*    lsb_delta         :: The difference between hinted and unhinted    */
  1.1553 +  /*                         left side bearing while autohinting is        */
  1.1554 +  /*                         active.  Zero otherwise.                      */
  1.1555 +  /*                                                                       */
  1.1556 +  /*    rsb_delta         :: The difference between hinted and unhinted    */
  1.1557 +  /*                         right side bearing while autohinting is       */
  1.1558 +  /*                         active.  Zero otherwise.                      */
  1.1559 +  /*                                                                       */
  1.1560 +  /* <Note>                                                                */
  1.1561 +  /*    If @FT_Load_Glyph is called with default flags (see                */
  1.1562 +  /*    @FT_LOAD_DEFAULT) the glyph image is loaded in the glyph slot in   */
  1.1563 +  /*    its native format (e.g., an outline glyph for TrueType and Type~1  */
  1.1564 +  /*    formats).                                                          */
  1.1565 +  /*                                                                       */
  1.1566 +  /*    This image can later be converted into a bitmap by calling         */
  1.1567 +  /*    @FT_Render_Glyph.  This function finds the current renderer for    */
  1.1568 +  /*    the native image's format, then invokes it.                        */
  1.1569 +  /*                                                                       */
  1.1570 +  /*    The renderer is in charge of transforming the native image through */
  1.1571 +  /*    the slot's face transformation fields, then converting it into a   */
  1.1572 +  /*    bitmap that is returned in `slot->bitmap'.                         */
  1.1573 +  /*                                                                       */
  1.1574 +  /*    Note that `slot->bitmap_left' and `slot->bitmap_top' are also used */
  1.1575 +  /*    to specify the position of the bitmap relative to the current pen  */
  1.1576 +  /*    position (e.g., coordinates (0,0) on the baseline).  Of course,    */
  1.1577 +  /*    `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP.         */
  1.1578 +  /*                                                                       */
  1.1579 +  /* <Note>                                                                */
  1.1580 +  /*    Here a small pseudo code fragment which shows how to use           */
  1.1581 +  /*    `lsb_delta' and `rsb_delta':                                       */
  1.1582 +  /*                                                                       */
  1.1583 +  /*    {                                                                  */
  1.1584 +  /*      FT_Pos  origin_x       = 0;                                      */
  1.1585 +  /*      FT_Pos  prev_rsb_delta = 0;                                      */
  1.1586 +  /*                                                                       */
  1.1587 +  /*                                                                       */
  1.1588 +  /*      for all glyphs do                                                */
  1.1589 +  /*        <compute kern between current and previous glyph and add it to */
  1.1590 +  /*         `origin_x'>                                                   */
  1.1591 +  /*                                                                       */
  1.1592 +  /*        <load glyph with `FT_Load_Glyph'>                              */
  1.1593 +  /*                                                                       */
  1.1594 +  /*        if ( prev_rsb_delta - face->glyph->lsb_delta >= 32 )           */
  1.1595 +  /*          origin_x -= 64;                                              */
  1.1596 +  /*        else if ( prev_rsb_delta - face->glyph->lsb_delta < -32 )      */
  1.1597 +  /*          origin_x += 64;                                              */
  1.1598 +  /*                                                                       */
  1.1599 +  /*        prev_rsb_delta = face->glyph->rsb_delta;                       */
  1.1600 +  /*                                                                       */
  1.1601 +  /*        <save glyph image, or render glyph, or ...>                    */
  1.1602 +  /*                                                                       */
  1.1603 +  /*        origin_x += face->glyph->advance.x;                            */
  1.1604 +  /*      endfor                                                           */
  1.1605 +  /*    }                                                                  */
  1.1606 +  /*                                                                       */
  1.1607 +  typedef struct  FT_GlyphSlotRec_
  1.1608 +  {
  1.1609 +    FT_Library        library;
  1.1610 +    FT_Face           face;
  1.1611 +    FT_GlyphSlot      next;
  1.1612 +    FT_UInt           reserved;       /* retained for binary compatibility */
  1.1613 +    FT_Generic        generic;
  1.1614 +
  1.1615 +    FT_Glyph_Metrics  metrics;
  1.1616 +    FT_Fixed          linearHoriAdvance;
  1.1617 +    FT_Fixed          linearVertAdvance;
  1.1618 +    FT_Vector         advance;
  1.1619 +
  1.1620 +    FT_Glyph_Format   format;
  1.1621 +
  1.1622 +    FT_Bitmap         bitmap;
  1.1623 +    FT_Int            bitmap_left;
  1.1624 +    FT_Int            bitmap_top;
  1.1625 +
  1.1626 +    FT_Outline        outline;
  1.1627 +
  1.1628 +    FT_UInt           num_subglyphs;
  1.1629 +    FT_SubGlyph       subglyphs;
  1.1630 +
  1.1631 +    void*             control_data;
  1.1632 +    long              control_len;
  1.1633 +
  1.1634 +    FT_Pos            lsb_delta;
  1.1635 +    FT_Pos            rsb_delta;
  1.1636 +
  1.1637 +    void*             other;
  1.1638 +
  1.1639 +    FT_Slot_Internal  internal;
  1.1640 +
  1.1641 +  } FT_GlyphSlotRec;
  1.1642 +
  1.1643 +
  1.1644 +  /*************************************************************************/
  1.1645 +  /*************************************************************************/
  1.1646 +  /*                                                                       */
  1.1647 +  /*                         F U N C T I O N S                             */
  1.1648 +  /*                                                                       */
  1.1649 +  /*************************************************************************/
  1.1650 +  /*************************************************************************/
  1.1651 +
  1.1652 +
  1.1653 +  /*************************************************************************/
  1.1654 +  /*                                                                       */
  1.1655 +  /* <Function>                                                            */
  1.1656 +  /*    FT_Init_FreeType                                                   */
  1.1657 +  /*                                                                       */
  1.1658 +  /* <Description>                                                         */
  1.1659 +  /*    Initialize a new FreeType library object.  The set of modules      */
  1.1660 +  /*    that are registered by this function is determined at build time.  */
  1.1661 +  /*                                                                       */
  1.1662 +  /* <Output>                                                              */
  1.1663 +  /*    alibrary :: A handle to a new library object.                      */
  1.1664 +  /*                                                                       */
  1.1665 +  /* <Return>                                                              */
  1.1666 +  /*    FreeType error code.  0~means success.                             */
  1.1667 +  /*                                                                       */
  1.1668 +  /* <Note>                                                                */
  1.1669 +  /*    In case you want to provide your own memory allocating routines,   */
  1.1670 +  /*    use @FT_New_Library instead, followed by a call to                 */
  1.1671 +  /*    @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module).  */
  1.1672 +  /*                                                                       */
  1.1673 +  FT_EXPORT( FT_Error )
  1.1674 +  FT_Init_FreeType( FT_Library  *alibrary );
  1.1675 +
  1.1676 +
  1.1677 +  /*************************************************************************/
  1.1678 +  /*                                                                       */
  1.1679 +  /* <Function>                                                            */
  1.1680 +  /*    FT_Done_FreeType                                                   */
  1.1681 +  /*                                                                       */
  1.1682 +  /* <Description>                                                         */
  1.1683 +  /*    Destroy a given FreeType library object and all of its children,   */
  1.1684 +  /*    including resources, drivers, faces, sizes, etc.                   */
  1.1685 +  /*                                                                       */
  1.1686 +  /* <Input>                                                               */
  1.1687 +  /*    library :: A handle to the target library object.                  */
  1.1688 +  /*                                                                       */
  1.1689 +  /* <Return>                                                              */
  1.1690 +  /*    FreeType error code.  0~means success.                             */
  1.1691 +  /*                                                                       */
  1.1692 +  FT_EXPORT( FT_Error )
  1.1693 +  FT_Done_FreeType( FT_Library  library );
  1.1694 +
  1.1695 +
  1.1696 +  /*************************************************************************/
  1.1697 +  /*                                                                       */
  1.1698 +  /* <Enum>                                                                */
  1.1699 +  /*    FT_OPEN_XXX                                                        */
  1.1700 +  /*                                                                       */
  1.1701 +  /* <Description>                                                         */
  1.1702 +  /*    A list of bit-field constants used within the `flags' field of the */
  1.1703 +  /*    @FT_Open_Args structure.                                           */
  1.1704 +  /*                                                                       */
  1.1705 +  /* <Values>                                                              */
  1.1706 +  /*    FT_OPEN_MEMORY   :: This is a memory-based stream.                 */
  1.1707 +  /*                                                                       */
  1.1708 +  /*    FT_OPEN_STREAM   :: Copy the stream from the `stream' field.       */
  1.1709 +  /*                                                                       */
  1.1710 +  /*    FT_OPEN_PATHNAME :: Create a new input stream from a C~path        */
  1.1711 +  /*                        name.                                          */
  1.1712 +  /*                                                                       */
  1.1713 +  /*    FT_OPEN_DRIVER   :: Use the `driver' field.                        */
  1.1714 +  /*                                                                       */
  1.1715 +  /*    FT_OPEN_PARAMS   :: Use the `num_params' and `params' fields.      */
  1.1716 +  /*                                                                       */
  1.1717 +  /*    ft_open_memory   :: Deprecated; use @FT_OPEN_MEMORY instead.       */
  1.1718 +  /*                                                                       */
  1.1719 +  /*    ft_open_stream   :: Deprecated; use @FT_OPEN_STREAM instead.       */
  1.1720 +  /*                                                                       */
  1.1721 +  /*    ft_open_pathname :: Deprecated; use @FT_OPEN_PATHNAME instead.     */
  1.1722 +  /*                                                                       */
  1.1723 +  /*    ft_open_driver   :: Deprecated; use @FT_OPEN_DRIVER instead.       */
  1.1724 +  /*                                                                       */
  1.1725 +  /*    ft_open_params   :: Deprecated; use @FT_OPEN_PARAMS instead.       */
  1.1726 +  /*                                                                       */
  1.1727 +  /* <Note>                                                                */
  1.1728 +  /*    The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME'     */
  1.1729 +  /*    flags are mutually exclusive.                                      */
  1.1730 +  /*                                                                       */
  1.1731 +#define FT_OPEN_MEMORY    0x1
  1.1732 +#define FT_OPEN_STREAM    0x2
  1.1733 +#define FT_OPEN_PATHNAME  0x4
  1.1734 +#define FT_OPEN_DRIVER    0x8
  1.1735 +#define FT_OPEN_PARAMS    0x10
  1.1736 +
  1.1737 +#define ft_open_memory    FT_OPEN_MEMORY     /* deprecated */
  1.1738 +#define ft_open_stream    FT_OPEN_STREAM     /* deprecated */
  1.1739 +#define ft_open_pathname  FT_OPEN_PATHNAME   /* deprecated */
  1.1740 +#define ft_open_driver    FT_OPEN_DRIVER     /* deprecated */
  1.1741 +#define ft_open_params    FT_OPEN_PARAMS     /* deprecated */
  1.1742 +
  1.1743 +
  1.1744 +  /*************************************************************************/
  1.1745 +  /*                                                                       */
  1.1746 +  /* <Struct>                                                              */
  1.1747 +  /*    FT_Parameter                                                       */
  1.1748 +  /*                                                                       */
  1.1749 +  /* <Description>                                                         */
  1.1750 +  /*    A simple structure used to pass more or less generic parameters to */
  1.1751 +  /*    @FT_Open_Face.                                                     */
  1.1752 +  /*                                                                       */
  1.1753 +  /* <Fields>                                                              */
  1.1754 +  /*    tag  :: A four-byte identification tag.                            */
  1.1755 +  /*                                                                       */
  1.1756 +  /*    data :: A pointer to the parameter data.                           */
  1.1757 +  /*                                                                       */
  1.1758 +  /* <Note>                                                                */
  1.1759 +  /*    The ID and function of parameters are driver-specific.  See the    */
  1.1760 +  /*    various FT_PARAM_TAG_XXX flags for more information.               */
  1.1761 +  /*                                                                       */
  1.1762 +  typedef struct  FT_Parameter_
  1.1763 +  {
  1.1764 +    FT_ULong    tag;
  1.1765 +    FT_Pointer  data;
  1.1766 +
  1.1767 +  } FT_Parameter;
  1.1768 +
  1.1769 +
  1.1770 +  /*************************************************************************/
  1.1771 +  /*                                                                       */
  1.1772 +  /* <Struct>                                                              */
  1.1773 +  /*    FT_Open_Args                                                       */
  1.1774 +  /*                                                                       */
  1.1775 +  /* <Description>                                                         */
  1.1776 +  /*    A structure used to indicate how to open a new font file or        */
  1.1777 +  /*    stream.  A pointer to such a structure can be used as a parameter  */
  1.1778 +  /*    for the functions @FT_Open_Face and @FT_Attach_Stream.             */
  1.1779 +  /*                                                                       */
  1.1780 +  /* <Fields>                                                              */
  1.1781 +  /*    flags       :: A set of bit flags indicating how to use the        */
  1.1782 +  /*                   structure.                                          */
  1.1783 +  /*                                                                       */
  1.1784 +  /*    memory_base :: The first byte of the file in memory.               */
  1.1785 +  /*                                                                       */
  1.1786 +  /*    memory_size :: The size in bytes of the file in memory.            */
  1.1787 +  /*                                                                       */
  1.1788 +  /*    pathname    :: A pointer to an 8-bit file pathname.                */
  1.1789 +  /*                                                                       */
  1.1790 +  /*    stream      :: A handle to a source stream object.                 */
  1.1791 +  /*                                                                       */
  1.1792 +  /*    driver      :: This field is exclusively used by @FT_Open_Face;    */
  1.1793 +  /*                   it simply specifies the font driver to use to open  */
  1.1794 +  /*                   the face.  If set to~0, FreeType tries to load the  */
  1.1795 +  /*                   face with each one of the drivers in its list.      */
  1.1796 +  /*                                                                       */
  1.1797 +  /*    num_params  :: The number of extra parameters.                     */
  1.1798 +  /*                                                                       */
  1.1799 +  /*    params      :: Extra parameters passed to the font driver when     */
  1.1800 +  /*                   opening a new face.                                 */
  1.1801 +  /*                                                                       */
  1.1802 +  /* <Note>                                                                */
  1.1803 +  /*    The stream type is determined by the contents of `flags' which     */
  1.1804 +  /*    are tested in the following order by @FT_Open_Face:                */
  1.1805 +  /*                                                                       */
  1.1806 +  /*    If the `FT_OPEN_MEMORY' bit is set, assume that this is a          */
  1.1807 +  /*    memory file of `memory_size' bytes, located at `memory_address'.   */
  1.1808 +  /*    The data are are not copied, and the client is responsible for     */
  1.1809 +  /*    releasing and destroying them _after_ the corresponding call to    */
  1.1810 +  /*    @FT_Done_Face.                                                     */
  1.1811 +  /*                                                                       */
  1.1812 +  /*    Otherwise, if the `FT_OPEN_STREAM' bit is set, assume that a       */
  1.1813 +  /*    custom input stream `stream' is used.                              */
  1.1814 +  /*                                                                       */
  1.1815 +  /*    Otherwise, if the `FT_OPEN_PATHNAME' bit is set, assume that this  */
  1.1816 +  /*    is a normal file and use `pathname' to open it.                    */
  1.1817 +  /*                                                                       */
  1.1818 +  /*    If the `FT_OPEN_DRIVER' bit is set, @FT_Open_Face only tries to    */
  1.1819 +  /*    open the file with the driver whose handler is in `driver'.        */
  1.1820 +  /*                                                                       */
  1.1821 +  /*    If the `FT_OPEN_PARAMS' bit is set, the parameters given by        */
  1.1822 +  /*    `num_params' and `params' is used.  They are ignored otherwise.    */
  1.1823 +  /*                                                                       */
  1.1824 +  /*    Ideally, both the `pathname' and `params' fields should be tagged  */
  1.1825 +  /*    as `const'; this is missing for API backwards compatibility.  In   */
  1.1826 +  /*    other words, applications should treat them as read-only.          */
  1.1827 +  /*                                                                       */
  1.1828 +  typedef struct  FT_Open_Args_
  1.1829 +  {
  1.1830 +    FT_UInt         flags;
  1.1831 +    const FT_Byte*  memory_base;
  1.1832 +    FT_Long         memory_size;
  1.1833 +    FT_String*      pathname;
  1.1834 +    FT_Stream       stream;
  1.1835 +    FT_Module       driver;
  1.1836 +    FT_Int          num_params;
  1.1837 +    FT_Parameter*   params;
  1.1838 +
  1.1839 +  } FT_Open_Args;
  1.1840 +
  1.1841 +
  1.1842 +  /*************************************************************************/
  1.1843 +  /*                                                                       */
  1.1844 +  /* <Function>                                                            */
  1.1845 +  /*    FT_New_Face                                                        */
  1.1846 +  /*                                                                       */
  1.1847 +  /* <Description>                                                         */
  1.1848 +  /*    This function calls @FT_Open_Face to open a font by its pathname.  */
  1.1849 +  /*                                                                       */
  1.1850 +  /* <InOut>                                                               */
  1.1851 +  /*    library    :: A handle to the library resource.                    */
  1.1852 +  /*                                                                       */
  1.1853 +  /* <Input>                                                               */
  1.1854 +  /*    pathname   :: A path to the font file.                             */
  1.1855 +  /*                                                                       */
  1.1856 +  /*    face_index :: The index of the face within the font.  The first    */
  1.1857 +  /*                  face has index~0.                                    */
  1.1858 +  /*                                                                       */
  1.1859 +  /* <Output>                                                              */
  1.1860 +  /*    aface      :: A handle to a new face object.  If `face_index' is   */
  1.1861 +  /*                  greater than or equal to zero, it must be non-NULL.  */
  1.1862 +  /*                  See @FT_Open_Face for more details.                  */
  1.1863 +  /*                                                                       */
  1.1864 +  /* <Return>                                                              */
  1.1865 +  /*    FreeType error code.  0~means success.                             */
  1.1866 +  /*                                                                       */
  1.1867 +  FT_EXPORT( FT_Error )
  1.1868 +  FT_New_Face( FT_Library   library,
  1.1869 +               const char*  filepathname,
  1.1870 +               FT_Long      face_index,
  1.1871 +               FT_Face     *aface );
  1.1872 +
  1.1873 +
  1.1874 +  /*************************************************************************/
  1.1875 +  /*                                                                       */
  1.1876 +  /* <Function>                                                            */
  1.1877 +  /*    FT_New_Memory_Face                                                 */
  1.1878 +  /*                                                                       */
  1.1879 +  /* <Description>                                                         */
  1.1880 +  /*    This function calls @FT_Open_Face to open a font which has been    */
  1.1881 +  /*    loaded into memory.                                                */
  1.1882 +  /*                                                                       */
  1.1883 +  /* <InOut>                                                               */
  1.1884 +  /*    library    :: A handle to the library resource.                    */
  1.1885 +  /*                                                                       */
  1.1886 +  /* <Input>                                                               */
  1.1887 +  /*    file_base  :: A pointer to the beginning of the font data.         */
  1.1888 +  /*                                                                       */
  1.1889 +  /*    file_size  :: The size of the memory chunk used by the font data.  */
  1.1890 +  /*                                                                       */
  1.1891 +  /*    face_index :: The index of the face within the font.  The first    */
  1.1892 +  /*                  face has index~0.                                    */
  1.1893 +  /*                                                                       */
  1.1894 +  /* <Output>                                                              */
  1.1895 +  /*    aface      :: A handle to a new face object.  If `face_index' is   */
  1.1896 +  /*                  greater than or equal to zero, it must be non-NULL.  */
  1.1897 +  /*                  See @FT_Open_Face for more details.                  */
  1.1898 +  /*                                                                       */
  1.1899 +  /* <Return>                                                              */
  1.1900 +  /*    FreeType error code.  0~means success.                             */
  1.1901 +  /*                                                                       */
  1.1902 +  /* <Note>                                                                */
  1.1903 +  /*    You must not deallocate the memory before calling @FT_Done_Face.   */
  1.1904 +  /*                                                                       */
  1.1905 +  FT_EXPORT( FT_Error )
  1.1906 +  FT_New_Memory_Face( FT_Library      library,
  1.1907 +                      const FT_Byte*  file_base,
  1.1908 +                      FT_Long         file_size,
  1.1909 +                      FT_Long         face_index,
  1.1910 +                      FT_Face        *aface );
  1.1911 +
  1.1912 +
  1.1913 +  /*************************************************************************/
  1.1914 +  /*                                                                       */
  1.1915 +  /* <Function>                                                            */
  1.1916 +  /*    FT_Open_Face                                                       */
  1.1917 +  /*                                                                       */
  1.1918 +  /* <Description>                                                         */
  1.1919 +  /*    Create a face object from a given resource described by            */
  1.1920 +  /*    @FT_Open_Args.                                                     */
  1.1921 +  /*                                                                       */
  1.1922 +  /* <InOut>                                                               */
  1.1923 +  /*    library    :: A handle to the library resource.                    */
  1.1924 +  /*                                                                       */
  1.1925 +  /* <Input>                                                               */
  1.1926 +  /*    args       :: A pointer to an `FT_Open_Args' structure which must  */
  1.1927 +  /*                  be filled by the caller.                             */
  1.1928 +  /*                                                                       */
  1.1929 +  /*    face_index :: The index of the face within the font.  The first    */
  1.1930 +  /*                  face has index~0.                                    */
  1.1931 +  /*                                                                       */
  1.1932 +  /* <Output>                                                              */
  1.1933 +  /*    aface      :: A handle to a new face object.  If `face_index' is   */
  1.1934 +  /*                  greater than or equal to zero, it must be non-NULL.  */
  1.1935 +  /*                  See note below.                                      */
  1.1936 +  /*                                                                       */
  1.1937 +  /* <Return>                                                              */
  1.1938 +  /*    FreeType error code.  0~means success.                             */
  1.1939 +  /*                                                                       */
  1.1940 +  /* <Note>                                                                */
  1.1941 +  /*    Unlike FreeType 1.x, this function automatically creates a glyph   */
  1.1942 +  /*    slot for the face object which can be accessed directly through    */
  1.1943 +  /*    `face->glyph'.                                                     */
  1.1944 +  /*                                                                       */
  1.1945 +  /*    FT_Open_Face can be used to quickly check whether the font         */
  1.1946 +  /*    format of a given font resource is supported by FreeType.  If the  */
  1.1947 +  /*    `face_index' field is negative, the function's return value is~0   */
  1.1948 +  /*    if the font format is recognized, or non-zero otherwise;           */
  1.1949 +  /*    the function returns a more or less empty face handle in `*aface'  */
  1.1950 +  /*    (if `aface' isn't NULL).  The only useful field in this special    */
  1.1951 +  /*    case is `face->num_faces' which gives the number of faces within   */
  1.1952 +  /*    the font file.  After examination, the returned @FT_Face structure */
  1.1953 +  /*    should be deallocated with a call to @FT_Done_Face.                */
  1.1954 +  /*                                                                       */
  1.1955 +  /*    Each new face object created with this function also owns a        */
  1.1956 +  /*    default @FT_Size object, accessible as `face->size'.               */
  1.1957 +  /*                                                                       */
  1.1958 +  /*    See the discussion of reference counters in the description of     */
  1.1959 +  /*    @FT_Reference_Face.                                                */
  1.1960 +  /*                                                                       */
  1.1961 +  FT_EXPORT( FT_Error )
  1.1962 +  FT_Open_Face( FT_Library           library,
  1.1963 +                const FT_Open_Args*  args,
  1.1964 +                FT_Long              face_index,
  1.1965 +                FT_Face             *aface );
  1.1966 +
  1.1967 +
  1.1968 +  /*************************************************************************/
  1.1969 +  /*                                                                       */
  1.1970 +  /* <Function>                                                            */
  1.1971 +  /*    FT_Attach_File                                                     */
  1.1972 +  /*                                                                       */
  1.1973 +  /* <Description>                                                         */
  1.1974 +  /*    This function calls @FT_Attach_Stream to attach a file.            */
  1.1975 +  /*                                                                       */
  1.1976 +  /* <InOut>                                                               */
  1.1977 +  /*    face         :: The target face object.                            */
  1.1978 +  /*                                                                       */
  1.1979 +  /* <Input>                                                               */
  1.1980 +  /*    filepathname :: The pathname.                                      */
  1.1981 +  /*                                                                       */
  1.1982 +  /* <Return>                                                              */
  1.1983 +  /*    FreeType error code.  0~means success.                             */
  1.1984 +  /*                                                                       */
  1.1985 +  FT_EXPORT( FT_Error )
  1.1986 +  FT_Attach_File( FT_Face      face,
  1.1987 +                  const char*  filepathname );
  1.1988 +
  1.1989 +
  1.1990 +  /*************************************************************************/
  1.1991 +  /*                                                                       */
  1.1992 +  /* <Function>                                                            */
  1.1993 +  /*    FT_Attach_Stream                                                   */
  1.1994 +  /*                                                                       */
  1.1995 +  /* <Description>                                                         */
  1.1996 +  /*    `Attach' data to a face object.  Normally, this is used to read    */
  1.1997 +  /*    additional information for the face object.  For example, you can  */
  1.1998 +  /*    attach an AFM file that comes with a Type~1 font to get the        */
  1.1999 +  /*    kerning values and other metrics.                                  */
  1.2000 +  /*                                                                       */
  1.2001 +  /* <InOut>                                                               */
  1.2002 +  /*    face       :: The target face object.                              */
  1.2003 +  /*                                                                       */
  1.2004 +  /* <Input>                                                               */
  1.2005 +  /*    parameters :: A pointer to @FT_Open_Args which must be filled by   */
  1.2006 +  /*                  the caller.                                          */
  1.2007 +  /*                                                                       */
  1.2008 +  /* <Return>                                                              */
  1.2009 +  /*    FreeType error code.  0~means success.                             */
  1.2010 +  /*                                                                       */
  1.2011 +  /* <Note>                                                                */
  1.2012 +  /*    The meaning of the `attach' (i.e., what really happens when the    */
  1.2013 +  /*    new file is read) is not fixed by FreeType itself.  It really      */
  1.2014 +  /*    depends on the font format (and thus the font driver).             */
  1.2015 +  /*                                                                       */
  1.2016 +  /*    Client applications are expected to know what they are doing       */
  1.2017 +  /*    when invoking this function.  Most drivers simply do not implement */
  1.2018 +  /*    file attachments.                                                  */
  1.2019 +  /*                                                                       */
  1.2020 +  FT_EXPORT( FT_Error )
  1.2021 +  FT_Attach_Stream( FT_Face        face,
  1.2022 +                    FT_Open_Args*  parameters );
  1.2023 +
  1.2024 +
  1.2025 +  /*************************************************************************/
  1.2026 +  /*                                                                       */
  1.2027 +  /* <Function>                                                            */
  1.2028 +  /*    FT_Reference_Face                                                  */
  1.2029 +  /*                                                                       */
  1.2030 +  /* <Description>                                                         */
  1.2031 +  /*    A counter gets initialized to~1 at the time an @FT_Face structure  */
  1.2032 +  /*    is created.  This function increments the counter.  @FT_Done_Face  */
  1.2033 +  /*    then only destroys a face if the counter is~1, otherwise it simply */
  1.2034 +  /*    decrements the counter.                                            */
  1.2035 +  /*                                                                       */
  1.2036 +  /*    This function helps in managing life-cycles of structures which    */
  1.2037 +  /*    reference @FT_Face objects.                                        */
  1.2038 +  /*                                                                       */
  1.2039 +  /* <Input>                                                               */
  1.2040 +  /*    face :: A handle to a target face object.                          */
  1.2041 +  /*                                                                       */
  1.2042 +  /* <Return>                                                              */
  1.2043 +  /*    FreeType error code.  0~means success.                             */
  1.2044 +  /*                                                                       */
  1.2045 +  /* <Since>                                                               */
  1.2046 +  /*    2.4.2                                                              */
  1.2047 +  /*                                                                       */
  1.2048 +  FT_EXPORT( FT_Error )
  1.2049 +  FT_Reference_Face( FT_Face  face );
  1.2050 +
  1.2051 +
  1.2052 +  /*************************************************************************/
  1.2053 +  /*                                                                       */
  1.2054 +  /* <Function>                                                            */
  1.2055 +  /*    FT_Done_Face                                                       */
  1.2056 +  /*                                                                       */
  1.2057 +  /* <Description>                                                         */
  1.2058 +  /*    Discard a given face object, as well as all of its child slots and */
  1.2059 +  /*    sizes.                                                             */
  1.2060 +  /*                                                                       */
  1.2061 +  /* <Input>                                                               */
  1.2062 +  /*    face :: A handle to a target face object.                          */
  1.2063 +  /*                                                                       */
  1.2064 +  /* <Return>                                                              */
  1.2065 +  /*    FreeType error code.  0~means success.                             */
  1.2066 +  /*                                                                       */
  1.2067 +  /* <Note>                                                                */
  1.2068 +  /*    See the discussion of reference counters in the description of     */
  1.2069 +  /*    @FT_Reference_Face.                                                */
  1.2070 +  /*                                                                       */
  1.2071 +  FT_EXPORT( FT_Error )
  1.2072 +  FT_Done_Face( FT_Face  face );
  1.2073 +
  1.2074 +
  1.2075 +  /*************************************************************************/
  1.2076 +  /*                                                                       */
  1.2077 +  /* <Function>                                                            */
  1.2078 +  /*    FT_Select_Size                                                     */
  1.2079 +  /*                                                                       */
  1.2080 +  /* <Description>                                                         */
  1.2081 +  /*    Select a bitmap strike.                                            */
  1.2082 +  /*                                                                       */
  1.2083 +  /* <InOut>                                                               */
  1.2084 +  /*    face         :: A handle to a target face object.                  */
  1.2085 +  /*                                                                       */
  1.2086 +  /* <Input>                                                               */
  1.2087 +  /*    strike_index :: The index of the bitmap strike in the              */
  1.2088 +  /*                    `available_sizes' field of @FT_FaceRec structure.  */
  1.2089 +  /*                                                                       */
  1.2090 +  /* <Return>                                                              */
  1.2091 +  /*    FreeType error code.  0~means success.                             */
  1.2092 +  /*                                                                       */
  1.2093 +  FT_EXPORT( FT_Error )
  1.2094 +  FT_Select_Size( FT_Face  face,
  1.2095 +                  FT_Int   strike_index );
  1.2096 +
  1.2097 +
  1.2098 +  /*************************************************************************/
  1.2099 +  /*                                                                       */
  1.2100 +  /* <Enum>                                                                */
  1.2101 +  /*    FT_Size_Request_Type                                               */
  1.2102 +  /*                                                                       */
  1.2103 +  /* <Description>                                                         */
  1.2104 +  /*    An enumeration type that lists the supported size request types.   */
  1.2105 +  /*                                                                       */
  1.2106 +  /* <Values>                                                              */
  1.2107 +  /*    FT_SIZE_REQUEST_TYPE_NOMINAL ::                                    */
  1.2108 +  /*      The nominal size.  The `units_per_EM' field of @FT_FaceRec is    */
  1.2109 +  /*      used to determine both scaling values.                           */
  1.2110 +  /*                                                                       */
  1.2111 +  /*    FT_SIZE_REQUEST_TYPE_REAL_DIM ::                                   */
  1.2112 +  /*      The real dimension.  The sum of the the `Ascender' and (minus    */
  1.2113 +  /*      of) the `Descender' fields of @FT_FaceRec are used to determine  */
  1.2114 +  /*      both scaling values.                                             */
  1.2115 +  /*                                                                       */
  1.2116 +  /*    FT_SIZE_REQUEST_TYPE_BBOX ::                                       */
  1.2117 +  /*      The font bounding box.  The width and height of the `bbox' field */
  1.2118 +  /*      of @FT_FaceRec are used to determine the horizontal and vertical */
  1.2119 +  /*      scaling value, respectively.                                     */
  1.2120 +  /*                                                                       */
  1.2121 +  /*    FT_SIZE_REQUEST_TYPE_CELL ::                                       */
  1.2122 +  /*      The `max_advance_width' field of @FT_FaceRec is used to          */
  1.2123 +  /*      determine the horizontal scaling value; the vertical scaling     */
  1.2124 +  /*      value is determined the same way as                              */
  1.2125 +  /*      @FT_SIZE_REQUEST_TYPE_REAL_DIM does.  Finally, both scaling      */
  1.2126 +  /*      values are set to the smaller one.  This type is useful if you   */
  1.2127 +  /*      want to specify the font size for, say, a window of a given      */
  1.2128 +  /*      dimension and 80x24 cells.                                       */
  1.2129 +  /*                                                                       */
  1.2130 +  /*    FT_SIZE_REQUEST_TYPE_SCALES ::                                     */
  1.2131 +  /*      Specify the scaling values directly.                             */
  1.2132 +  /*                                                                       */
  1.2133 +  /* <Note>                                                                */
  1.2134 +  /*    The above descriptions only apply to scalable formats.  For bitmap */
  1.2135 +  /*    formats, the behaviour is up to the driver.                        */
  1.2136 +  /*                                                                       */
  1.2137 +  /*    See the note section of @FT_Size_Metrics if you wonder how size    */
  1.2138 +  /*    requesting relates to scaling values.                              */
  1.2139 +  /*                                                                       */
  1.2140 +  typedef enum  FT_Size_Request_Type_
  1.2141 +  {
  1.2142 +    FT_SIZE_REQUEST_TYPE_NOMINAL,
  1.2143 +    FT_SIZE_REQUEST_TYPE_REAL_DIM,
  1.2144 +    FT_SIZE_REQUEST_TYPE_BBOX,
  1.2145 +    FT_SIZE_REQUEST_TYPE_CELL,
  1.2146 +    FT_SIZE_REQUEST_TYPE_SCALES,
  1.2147 +
  1.2148 +    FT_SIZE_REQUEST_TYPE_MAX
  1.2149 +
  1.2150 +  } FT_Size_Request_Type;
  1.2151 +
  1.2152 +
  1.2153 +  /*************************************************************************/
  1.2154 +  /*                                                                       */
  1.2155 +  /* <Struct>                                                              */
  1.2156 +  /*    FT_Size_RequestRec                                                 */
  1.2157 +  /*                                                                       */
  1.2158 +  /* <Description>                                                         */
  1.2159 +  /*    A structure used to model a size request.                          */
  1.2160 +  /*                                                                       */
  1.2161 +  /* <Fields>                                                              */
  1.2162 +  /*    type           :: See @FT_Size_Request_Type.                       */
  1.2163 +  /*                                                                       */
  1.2164 +  /*    width          :: The desired width.                               */
  1.2165 +  /*                                                                       */
  1.2166 +  /*    height         :: The desired height.                              */
  1.2167 +  /*                                                                       */
  1.2168 +  /*    horiResolution :: The horizontal resolution.  If set to zero,      */
  1.2169 +  /*                      `width' is treated as a 26.6 fractional pixel    */
  1.2170 +  /*                      value.                                           */
  1.2171 +  /*                                                                       */
  1.2172 +  /*    vertResolution :: The vertical resolution.  If set to zero,        */
  1.2173 +  /*                      `height' is treated as a 26.6 fractional pixel   */
  1.2174 +  /*                      value.                                           */
  1.2175 +  /*                                                                       */
  1.2176 +  /* <Note>                                                                */
  1.2177 +  /*    If `width' is zero, then the horizontal scaling value is set equal */
  1.2178 +  /*    to the vertical scaling value, and vice versa.                     */
  1.2179 +  /*                                                                       */
  1.2180 +  typedef struct  FT_Size_RequestRec_
  1.2181 +  {
  1.2182 +    FT_Size_Request_Type  type;
  1.2183 +    FT_Long               width;
  1.2184 +    FT_Long               height;
  1.2185 +    FT_UInt               horiResolution;
  1.2186 +    FT_UInt               vertResolution;
  1.2187 +
  1.2188 +  } FT_Size_RequestRec;
  1.2189 +
  1.2190 +
  1.2191 +  /*************************************************************************/
  1.2192 +  /*                                                                       */
  1.2193 +  /* <Struct>                                                              */
  1.2194 +  /*    FT_Size_Request                                                    */
  1.2195 +  /*                                                                       */
  1.2196 +  /* <Description>                                                         */
  1.2197 +  /*    A handle to a size request structure.                              */
  1.2198 +  /*                                                                       */
  1.2199 +  typedef struct FT_Size_RequestRec_  *FT_Size_Request;
  1.2200 +
  1.2201 +
  1.2202 +  /*************************************************************************/
  1.2203 +  /*                                                                       */
  1.2204 +  /* <Function>                                                            */
  1.2205 +  /*    FT_Request_Size                                                    */
  1.2206 +  /*                                                                       */
  1.2207 +  /* <Description>                                                         */
  1.2208 +  /*    Resize the scale of the active @FT_Size object in a face.          */
  1.2209 +  /*                                                                       */
  1.2210 +  /* <InOut>                                                               */
  1.2211 +  /*    face :: A handle to a target face object.                          */
  1.2212 +  /*                                                                       */
  1.2213 +  /* <Input>                                                               */
  1.2214 +  /*    req  :: A pointer to a @FT_Size_RequestRec.                        */
  1.2215 +  /*                                                                       */
  1.2216 +  /* <Return>                                                              */
  1.2217 +  /*    FreeType error code.  0~means success.                             */
  1.2218 +  /*                                                                       */
  1.2219 +  /* <Note>                                                                */
  1.2220 +  /*    Although drivers may select the bitmap strike matching the         */
  1.2221 +  /*    request, you should not rely on this if you intend to select a     */
  1.2222 +  /*    particular bitmap strike.  Use @FT_Select_Size instead in that     */
  1.2223 +  /*    case.                                                              */
  1.2224 +  /*                                                                       */
  1.2225 +  FT_EXPORT( FT_Error )
  1.2226 +  FT_Request_Size( FT_Face          face,
  1.2227 +                   FT_Size_Request  req );
  1.2228 +
  1.2229 +
  1.2230 +  /*************************************************************************/
  1.2231 +  /*                                                                       */
  1.2232 +  /* <Function>                                                            */
  1.2233 +  /*    FT_Set_Char_Size                                                   */
  1.2234 +  /*                                                                       */
  1.2235 +  /* <Description>                                                         */
  1.2236 +  /*    This function calls @FT_Request_Size to request the nominal size   */
  1.2237 +  /*    (in points).                                                       */
  1.2238 +  /*                                                                       */
  1.2239 +  /* <InOut>                                                               */
  1.2240 +  /*    face            :: A handle to a target face object.               */
  1.2241 +  /*                                                                       */
  1.2242 +  /* <Input>                                                               */
  1.2243 +  /*    char_width      :: The nominal width, in 26.6 fractional points.   */
  1.2244 +  /*                                                                       */
  1.2245 +  /*    char_height     :: The nominal height, in 26.6 fractional points.  */
  1.2246 +  /*                                                                       */
  1.2247 +  /*    horz_resolution :: The horizontal resolution in dpi.               */
  1.2248 +  /*                                                                       */
  1.2249 +  /*    vert_resolution :: The vertical resolution in dpi.                 */
  1.2250 +  /*                                                                       */
  1.2251 +  /* <Return>                                                              */
  1.2252 +  /*    FreeType error code.  0~means success.                             */
  1.2253 +  /*                                                                       */
  1.2254 +  /* <Note>                                                                */
  1.2255 +  /*    If either the character width or height is zero, it is set equal   */
  1.2256 +  /*    to the other value.                                                */
  1.2257 +  /*                                                                       */
  1.2258 +  /*    If either the horizontal or vertical resolution is zero, it is set */
  1.2259 +  /*    equal to the other value.                                          */
  1.2260 +  /*                                                                       */
  1.2261 +  /*    A character width or height smaller than 1pt is set to 1pt; if     */
  1.2262 +  /*    both resolution values are zero, they are set to 72dpi.            */
  1.2263 +  /*                                                                       */
  1.2264 +  /*    Don't use this function if you are using the FreeType cache API.   */
  1.2265 +  /*                                                                       */
  1.2266 +  FT_EXPORT( FT_Error )
  1.2267 +  FT_Set_Char_Size( FT_Face     face,
  1.2268 +                    FT_F26Dot6  char_width,
  1.2269 +                    FT_F26Dot6  char_height,
  1.2270 +                    FT_UInt     horz_resolution,
  1.2271 +                    FT_UInt     vert_resolution );
  1.2272 +
  1.2273 +
  1.2274 +  /*************************************************************************/
  1.2275 +  /*                                                                       */
  1.2276 +  /* <Function>                                                            */
  1.2277 +  /*    FT_Set_Pixel_Sizes                                                 */
  1.2278 +  /*                                                                       */
  1.2279 +  /* <Description>                                                         */
  1.2280 +  /*    This function calls @FT_Request_Size to request the nominal size   */
  1.2281 +  /*    (in pixels).                                                       */
  1.2282 +  /*                                                                       */
  1.2283 +  /* <InOut>                                                               */
  1.2284 +  /*    face         :: A handle to the target face object.                */
  1.2285 +  /*                                                                       */
  1.2286 +  /* <Input>                                                               */
  1.2287 +  /*    pixel_width  :: The nominal width, in pixels.                      */
  1.2288 +  /*                                                                       */
  1.2289 +  /*    pixel_height :: The nominal height, in pixels.                     */
  1.2290 +  /*                                                                       */
  1.2291 +  /* <Return>                                                              */
  1.2292 +  /*    FreeType error code.  0~means success.                             */
  1.2293 +  /*                                                                       */
  1.2294 +  FT_EXPORT( FT_Error )
  1.2295 +  FT_Set_Pixel_Sizes( FT_Face  face,
  1.2296 +                      FT_UInt  pixel_width,
  1.2297 +                      FT_UInt  pixel_height );
  1.2298 +
  1.2299 +
  1.2300 +  /*************************************************************************/
  1.2301 +  /*                                                                       */
  1.2302 +  /* <Function>                                                            */
  1.2303 +  /*    FT_Load_Glyph                                                      */
  1.2304 +  /*                                                                       */
  1.2305 +  /* <Description>                                                         */
  1.2306 +  /*    A function used to load a single glyph into the glyph slot of a    */
  1.2307 +  /*    face object.                                                       */
  1.2308 +  /*                                                                       */
  1.2309 +  /* <InOut>                                                               */
  1.2310 +  /*    face        :: A handle to the target face object where the glyph  */
  1.2311 +  /*                   is loaded.                                          */
  1.2312 +  /*                                                                       */
  1.2313 +  /* <Input>                                                               */
  1.2314 +  /*    glyph_index :: The index of the glyph in the font file.  For       */
  1.2315 +  /*                   CID-keyed fonts (either in PS or in CFF format)     */
  1.2316 +  /*                   this argument specifies the CID value.              */
  1.2317 +  /*                                                                       */
  1.2318 +  /*    load_flags  :: A flag indicating what to load for this glyph.  The */
  1.2319 +  /*                   @FT_LOAD_XXX constants can be used to control the   */
  1.2320 +  /*                   glyph loading process (e.g., whether the outline    */
  1.2321 +  /*                   should be scaled, whether to load bitmaps or not,   */
  1.2322 +  /*                   whether to hint the outline, etc).                  */
  1.2323 +  /*                                                                       */
  1.2324 +  /* <Return>                                                              */
  1.2325 +  /*    FreeType error code.  0~means success.                             */
  1.2326 +  /*                                                                       */
  1.2327 +  /* <Note>                                                                */
  1.2328 +  /*    The loaded glyph may be transformed.  See @FT_Set_Transform for    */
  1.2329 +  /*    the details.                                                       */
  1.2330 +  /*                                                                       */
  1.2331 +  /*    For subsetted CID-keyed fonts, `FT_Err_Invalid_Argument' is        */
  1.2332 +  /*    returned for invalid CID values (this is, for CID values which     */
  1.2333 +  /*    don't have a corresponding glyph in the font).  See the discussion */
  1.2334 +  /*    of the @FT_FACE_FLAG_CID_KEYED flag for more details.              */
  1.2335 +  /*                                                                       */
  1.2336 +  FT_EXPORT( FT_Error )
  1.2337 +  FT_Load_Glyph( FT_Face   face,
  1.2338 +                 FT_UInt   glyph_index,
  1.2339 +                 FT_Int32  load_flags );
  1.2340 +
  1.2341 +
  1.2342 +  /*************************************************************************/
  1.2343 +  /*                                                                       */
  1.2344 +  /* <Function>                                                            */
  1.2345 +  /*    FT_Load_Char                                                       */
  1.2346 +  /*                                                                       */
  1.2347 +  /* <Description>                                                         */
  1.2348 +  /*    A function used to load a single glyph into the glyph slot of a    */
  1.2349 +  /*    face object, according to its character code.                      */
  1.2350 +  /*                                                                       */
  1.2351 +  /* <InOut>                                                               */
  1.2352 +  /*    face        :: A handle to a target face object where the glyph    */
  1.2353 +  /*                   is loaded.                                          */
  1.2354 +  /*                                                                       */
  1.2355 +  /* <Input>                                                               */
  1.2356 +  /*    char_code   :: The glyph's character code, according to the        */
  1.2357 +  /*                   current charmap used in the face.                   */
  1.2358 +  /*                                                                       */
  1.2359 +  /*    load_flags  :: A flag indicating what to load for this glyph.  The */
  1.2360 +  /*                   @FT_LOAD_XXX constants can be used to control the   */
  1.2361 +  /*                   glyph loading process (e.g., whether the outline    */
  1.2362 +  /*                   should be scaled, whether to load bitmaps or not,   */
  1.2363 +  /*                   whether to hint the outline, etc).                  */
  1.2364 +  /*                                                                       */
  1.2365 +  /* <Return>                                                              */
  1.2366 +  /*    FreeType error code.  0~means success.                             */
  1.2367 +  /*                                                                       */
  1.2368 +  /* <Note>                                                                */
  1.2369 +  /*    This function simply calls @FT_Get_Char_Index and @FT_Load_Glyph.  */
  1.2370 +  /*                                                                       */
  1.2371 +  FT_EXPORT( FT_Error )
  1.2372 +  FT_Load_Char( FT_Face   face,
  1.2373 +                FT_ULong  char_code,
  1.2374 +                FT_Int32  load_flags );
  1.2375 +
  1.2376 +
  1.2377 +  /*************************************************************************
  1.2378 +   *
  1.2379 +   * @enum:
  1.2380 +   *   FT_LOAD_XXX
  1.2381 +   *
  1.2382 +   * @description:
  1.2383 +   *   A list of bit-field constants used with @FT_Load_Glyph to indicate
  1.2384 +   *   what kind of operations to perform during glyph loading.
  1.2385 +   *
  1.2386 +   * @values:
  1.2387 +   *   FT_LOAD_DEFAULT ::
  1.2388 +   *     Corresponding to~0, this value is used as the default glyph load
  1.2389 +   *     operation.  In this case, the following happens:
  1.2390 +   *
  1.2391 +   *     1. FreeType looks for a bitmap for the glyph corresponding to the
  1.2392 +   *        face's current size.  If one is found, the function returns.
  1.2393 +   *        The bitmap data can be accessed from the glyph slot (see note
  1.2394 +   *        below).
  1.2395 +   *
  1.2396 +   *     2. If no embedded bitmap is searched or found, FreeType looks for a
  1.2397 +   *        scalable outline.  If one is found, it is loaded from the font
  1.2398 +   *        file, scaled to device pixels, then `hinted' to the pixel grid
  1.2399 +   *        in order to optimize it.  The outline data can be accessed from
  1.2400 +   *        the glyph slot (see note below).
  1.2401 +   *
  1.2402 +   *     Note that by default, the glyph loader doesn't render outlines into
  1.2403 +   *     bitmaps.  The following flags are used to modify this default
  1.2404 +   *     behaviour to more specific and useful cases.
  1.2405 +   *
  1.2406 +   *   FT_LOAD_NO_SCALE ::
  1.2407 +   *     Don't scale the outline glyph loaded, but keep it in font units.
  1.2408 +   *
  1.2409 +   *     This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and
  1.2410 +   *     unsets @FT_LOAD_RENDER.
  1.2411 +   *
  1.2412 +   *   FT_LOAD_NO_HINTING ::
  1.2413 +   *     Disable hinting.  This generally generates `blurrier' bitmap glyph
  1.2414 +   *     when the glyph is rendered in any of the anti-aliased modes.  See
  1.2415 +   *     also the note below.
  1.2416 +   *
  1.2417 +   *     This flag is implied by @FT_LOAD_NO_SCALE.
  1.2418 +   *
  1.2419 +   *   FT_LOAD_RENDER ::
  1.2420 +   *     Call @FT_Render_Glyph after the glyph is loaded.  By default, the
  1.2421 +   *     glyph is rendered in @FT_RENDER_MODE_NORMAL mode.  This can be
  1.2422 +   *     overridden by @FT_LOAD_TARGET_XXX or @FT_LOAD_MONOCHROME.
  1.2423 +   *
  1.2424 +   *     This flag is unset by @FT_LOAD_NO_SCALE.
  1.2425 +   *
  1.2426 +   *   FT_LOAD_NO_BITMAP ::
  1.2427 +   *     Ignore bitmap strikes when loading.  Bitmap-only fonts ignore this
  1.2428 +   *     flag.
  1.2429 +   *
  1.2430 +   *     @FT_LOAD_NO_SCALE always sets this flag.
  1.2431 +   *
  1.2432 +   *   FT_LOAD_VERTICAL_LAYOUT ::
  1.2433 +   *     Load the glyph for vertical text layout.  _Don't_ use it as it is
  1.2434 +   *     problematic currently.
  1.2435 +   *
  1.2436 +   *   FT_LOAD_FORCE_AUTOHINT ::
  1.2437 +   *     Indicates that the auto-hinter is preferred over the font's native
  1.2438 +   *     hinter.  See also the note below.
  1.2439 +   *
  1.2440 +   *   FT_LOAD_CROP_BITMAP ::
  1.2441 +   *     Indicates that the font driver should crop the loaded bitmap glyph
  1.2442 +   *     (i.e., remove all space around its black bits).  Not all drivers
  1.2443 +   *     implement this.
  1.2444 +   *
  1.2445 +   *   FT_LOAD_PEDANTIC ::
  1.2446 +   *     Indicates that the font driver should perform pedantic verifications
  1.2447 +   *     during glyph loading.  This is mostly used to detect broken glyphs
  1.2448 +   *     in fonts.  By default, FreeType tries to handle broken fonts also.
  1.2449 +   *
  1.2450 +   *   FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::
  1.2451 +   *     Indicates that the font driver should ignore the global advance
  1.2452 +   *     width defined in the font.  By default, that value is used as the
  1.2453 +   *     advance width for all glyphs when the face has
  1.2454 +   *     @FT_FACE_FLAG_FIXED_WIDTH set.
  1.2455 +   *
  1.2456 +   *     This flag exists for historical reasons (to support buggy CJK
  1.2457 +   *     fonts).
  1.2458 +   *
  1.2459 +   *   FT_LOAD_NO_RECURSE ::
  1.2460 +   *     This flag is only used internally.  It merely indicates that the
  1.2461 +   *     font driver should not load composite glyphs recursively.  Instead,
  1.2462 +   *     it should set the `num_subglyph' and `subglyphs' values of the
  1.2463 +   *     glyph slot accordingly, and set `glyph->format' to
  1.2464 +   *     @FT_GLYPH_FORMAT_COMPOSITE.
  1.2465 +   *
  1.2466 +   *     The description of sub-glyphs is not available to client
  1.2467 +   *     applications for now.
  1.2468 +   *
  1.2469 +   *     This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM.
  1.2470 +   *
  1.2471 +   *   FT_LOAD_IGNORE_TRANSFORM ::
  1.2472 +   *     Indicates that the transform matrix set by @FT_Set_Transform should
  1.2473 +   *     be ignored.
  1.2474 +   *
  1.2475 +   *   FT_LOAD_MONOCHROME ::
  1.2476 +   *     This flag is used with @FT_LOAD_RENDER to indicate that you want to
  1.2477 +   *     render an outline glyph to a 1-bit monochrome bitmap glyph, with
  1.2478 +   *     8~pixels packed into each byte of the bitmap data.
  1.2479 +   *
  1.2480 +   *     Note that this has no effect on the hinting algorithm used.  You
  1.2481 +   *     should rather use @FT_LOAD_TARGET_MONO so that the
  1.2482 +   *     monochrome-optimized hinting algorithm is used.
  1.2483 +   *
  1.2484 +   *   FT_LOAD_LINEAR_DESIGN ::
  1.2485 +   *     Indicates that the `linearHoriAdvance' and `linearVertAdvance'
  1.2486 +   *     fields of @FT_GlyphSlotRec should be kept in font units.  See
  1.2487 +   *     @FT_GlyphSlotRec for details.
  1.2488 +   *
  1.2489 +   *   FT_LOAD_NO_AUTOHINT ::
  1.2490 +   *     Disable auto-hinter.  See also the note below.
  1.2491 +   *
  1.2492 +   * @note:
  1.2493 +   *   By default, hinting is enabled and the font's native hinter (see
  1.2494 +   *   @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter.  You can
  1.2495 +   *   disable hinting by setting @FT_LOAD_NO_HINTING or change the
  1.2496 +   *   precedence by setting @FT_LOAD_FORCE_AUTOHINT.  You can also set
  1.2497 +   *   @FT_LOAD_NO_AUTOHINT in case you don't want the auto-hinter to be
  1.2498 +   *   used at all.
  1.2499 +   *
  1.2500 +   *   See the description of @FT_FACE_FLAG_TRICKY for a special exception
  1.2501 +   *   (affecting only a handful of Asian fonts).
  1.2502 +   *
  1.2503 +   *   Besides deciding which hinter to use, you can also decide which
  1.2504 +   *   hinting algorithm to use.  See @FT_LOAD_TARGET_XXX for details.
  1.2505 +   *
  1.2506 +   */
  1.2507 +#define FT_LOAD_DEFAULT                      0x0
  1.2508 +#define FT_LOAD_NO_SCALE                     0x1
  1.2509 +#define FT_LOAD_NO_HINTING                   0x2
  1.2510 +#define FT_LOAD_RENDER                       0x4
  1.2511 +#define FT_LOAD_NO_BITMAP                    0x8
  1.2512 +#define FT_LOAD_VERTICAL_LAYOUT              0x10
  1.2513 +#define FT_LOAD_FORCE_AUTOHINT               0x20
  1.2514 +#define FT_LOAD_CROP_BITMAP                  0x40
  1.2515 +#define FT_LOAD_PEDANTIC                     0x80
  1.2516 +#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH  0x200
  1.2517 +#define FT_LOAD_NO_RECURSE                   0x400
  1.2518 +#define FT_LOAD_IGNORE_TRANSFORM             0x800
  1.2519 +#define FT_LOAD_MONOCHROME                   0x1000
  1.2520 +#define FT_LOAD_LINEAR_DESIGN                0x2000
  1.2521 +#define FT_LOAD_NO_AUTOHINT                  0x8000U
  1.2522 +
  1.2523 +  /* */
  1.2524 +
  1.2525 +  /* used internally only by certain font drivers! */
  1.2526 +#define FT_LOAD_ADVANCE_ONLY                 0x100
  1.2527 +#define FT_LOAD_SBITS_ONLY                   0x4000
  1.2528 +
  1.2529 +
  1.2530 +  /**************************************************************************
  1.2531 +   *
  1.2532 +   * @enum:
  1.2533 +   *   FT_LOAD_TARGET_XXX
  1.2534 +   *
  1.2535 +   * @description:
  1.2536 +   *   A list of values that are used to select a specific hinting algorithm
  1.2537 +   *   to use by the hinter.  You should OR one of these values to your
  1.2538 +   *   `load_flags' when calling @FT_Load_Glyph.
  1.2539 +   *
  1.2540 +   *   Note that font's native hinters may ignore the hinting algorithm you
  1.2541 +   *   have specified (e.g., the TrueType bytecode interpreter).  You can set
  1.2542 +   *   @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used.
  1.2543 +   *
  1.2544 +   *   Also note that @FT_LOAD_TARGET_LIGHT is an exception, in that it
  1.2545 +   *   always implies @FT_LOAD_FORCE_AUTOHINT.
  1.2546 +   *
  1.2547 +   * @values:
  1.2548 +   *   FT_LOAD_TARGET_NORMAL ::
  1.2549 +   *     This corresponds to the default hinting algorithm, optimized for
  1.2550 +   *     standard gray-level rendering.  For monochrome output, use
  1.2551 +   *     @FT_LOAD_TARGET_MONO instead.
  1.2552 +   *
  1.2553 +   *   FT_LOAD_TARGET_LIGHT ::
  1.2554 +   *     A lighter hinting algorithm for non-monochrome modes.  Many
  1.2555 +   *     generated glyphs are more fuzzy but better resemble its original
  1.2556 +   *     shape.  A bit like rendering on Mac OS~X.
  1.2557 +   *
  1.2558 +   *     As a special exception, this target implies @FT_LOAD_FORCE_AUTOHINT.
  1.2559 +   *
  1.2560 +   *   FT_LOAD_TARGET_MONO ::
  1.2561 +   *     Strong hinting algorithm that should only be used for monochrome
  1.2562 +   *     output.  The result is probably unpleasant if the glyph is rendered
  1.2563 +   *     in non-monochrome modes.
  1.2564 +   *
  1.2565 +   *   FT_LOAD_TARGET_LCD ::
  1.2566 +   *     A variant of @FT_LOAD_TARGET_NORMAL optimized for horizontally
  1.2567 +   *     decimated LCD displays.
  1.2568 +   *
  1.2569 +   *   FT_LOAD_TARGET_LCD_V ::
  1.2570 +   *     A variant of @FT_LOAD_TARGET_NORMAL optimized for vertically
  1.2571 +   *     decimated LCD displays.
  1.2572 +   *
  1.2573 +   * @note:
  1.2574 +   *   You should use only _one_ of the FT_LOAD_TARGET_XXX values in your
  1.2575 +   *   `load_flags'.  They can't be ORed.
  1.2576 +   *
  1.2577 +   *   If @FT_LOAD_RENDER is also set, the glyph is rendered in the
  1.2578 +   *   corresponding mode (i.e., the mode which matches the used algorithm
  1.2579 +   *   best) unless @FT_LOAD_MONOCHROME is set.
  1.2580 +   *
  1.2581 +   *   You can use a hinting algorithm that doesn't correspond to the same
  1.2582 +   *   rendering mode.  As an example, it is possible to use the `light'
  1.2583 +   *   hinting algorithm and have the results rendered in horizontal LCD
  1.2584 +   *   pixel mode, with code like
  1.2585 +   *
  1.2586 +   *     {
  1.2587 +   *       FT_Load_Glyph( face, glyph_index,
  1.2588 +   *                      load_flags | FT_LOAD_TARGET_LIGHT );
  1.2589 +   *
  1.2590 +   *       FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD );
  1.2591 +   *     }
  1.2592 +   *
  1.2593 +   */
  1.2594 +#define FT_LOAD_TARGET_( x )   ( (FT_Int32)( (x) & 15 ) << 16 )
  1.2595 +
  1.2596 +#define FT_LOAD_TARGET_NORMAL  FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL )
  1.2597 +#define FT_LOAD_TARGET_LIGHT   FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT  )
  1.2598 +#define FT_LOAD_TARGET_MONO    FT_LOAD_TARGET_( FT_RENDER_MODE_MONO   )
  1.2599 +#define FT_LOAD_TARGET_LCD     FT_LOAD_TARGET_( FT_RENDER_MODE_LCD    )
  1.2600 +#define FT_LOAD_TARGET_LCD_V   FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V  )
  1.2601 +
  1.2602 +
  1.2603 +  /**************************************************************************
  1.2604 +   *
  1.2605 +   * @macro:
  1.2606 +   *   FT_LOAD_TARGET_MODE
  1.2607 +   *
  1.2608 +   * @description:
  1.2609 +   *   Return the @FT_Render_Mode corresponding to a given
  1.2610 +   *   @FT_LOAD_TARGET_XXX value.
  1.2611 +   *
  1.2612 +   */
  1.2613 +#define FT_LOAD_TARGET_MODE( x )  ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) )
  1.2614 +
  1.2615 +
  1.2616 +  /*************************************************************************/
  1.2617 +  /*                                                                       */
  1.2618 +  /* <Function>                                                            */
  1.2619 +  /*    FT_Set_Transform                                                   */
  1.2620 +  /*                                                                       */
  1.2621 +  /* <Description>                                                         */
  1.2622 +  /*    A function used to set the transformation that is applied to glyph */
  1.2623 +  /*    images when they are loaded into a glyph slot through              */
  1.2624 +  /*    @FT_Load_Glyph.                                                    */
  1.2625 +  /*                                                                       */
  1.2626 +  /* <InOut>                                                               */
  1.2627 +  /*    face   :: A handle to the source face object.                      */
  1.2628 +  /*                                                                       */
  1.2629 +  /* <Input>                                                               */
  1.2630 +  /*    matrix :: A pointer to the transformation's 2x2 matrix.  Use~0 for */
  1.2631 +  /*              the identity matrix.                                     */
  1.2632 +  /*    delta  :: A pointer to the translation vector.  Use~0 for the null */
  1.2633 +  /*              vector.                                                  */
  1.2634 +  /*                                                                       */
  1.2635 +  /* <Note>                                                                */
  1.2636 +  /*    The transformation is only applied to scalable image formats after */
  1.2637 +  /*    the glyph has been loaded.  It means that hinting is unaltered by  */
  1.2638 +  /*    the transformation and is performed on the character size given in */
  1.2639 +  /*    the last call to @FT_Set_Char_Size or @FT_Set_Pixel_Sizes.         */
  1.2640 +  /*                                                                       */
  1.2641 +  /*    Note that this also transforms the `face.glyph.advance' field, but */
  1.2642 +  /*    *not* the values in `face.glyph.metrics'.                          */
  1.2643 +  /*                                                                       */
  1.2644 +  FT_EXPORT( void )
  1.2645 +  FT_Set_Transform( FT_Face     face,
  1.2646 +                    FT_Matrix*  matrix,
  1.2647 +                    FT_Vector*  delta );
  1.2648 +
  1.2649 +
  1.2650 +  /*************************************************************************/
  1.2651 +  /*                                                                       */
  1.2652 +  /* <Enum>                                                                */
  1.2653 +  /*    FT_Render_Mode                                                     */
  1.2654 +  /*                                                                       */
  1.2655 +  /* <Description>                                                         */
  1.2656 +  /*    An enumeration type that lists the render modes supported by       */
  1.2657 +  /*    FreeType~2.  Each mode corresponds to a specific type of scanline  */
  1.2658 +  /*    conversion performed on the outline.                               */
  1.2659 +  /*                                                                       */
  1.2660 +  /*    For bitmap fonts and embedded bitmaps the `bitmap->pixel_mode'     */
  1.2661 +  /*    field in the @FT_GlyphSlotRec structure gives the format of the    */
  1.2662 +  /*    returned bitmap.                                                   */
  1.2663 +  /*                                                                       */
  1.2664 +  /*    All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity.   */
  1.2665 +  /*                                                                       */
  1.2666 +  /* <Values>                                                              */
  1.2667 +  /*    FT_RENDER_MODE_NORMAL ::                                           */
  1.2668 +  /*      This is the default render mode; it corresponds to 8-bit         */
  1.2669 +  /*      anti-aliased bitmaps.                                            */
  1.2670 +  /*                                                                       */
  1.2671 +  /*    FT_RENDER_MODE_LIGHT ::                                            */
  1.2672 +  /*      This is equivalent to @FT_RENDER_MODE_NORMAL.  It is only        */
  1.2673 +  /*      defined as a separate value because render modes are also used   */
  1.2674 +  /*      indirectly to define hinting algorithm selectors.  See           */
  1.2675 +  /*      @FT_LOAD_TARGET_XXX for details.                                 */
  1.2676 +  /*                                                                       */
  1.2677 +  /*    FT_RENDER_MODE_MONO ::                                             */
  1.2678 +  /*      This mode corresponds to 1-bit bitmaps (with 2~levels of         */
  1.2679 +  /*      opacity).                                                        */
  1.2680 +  /*                                                                       */
  1.2681 +  /*    FT_RENDER_MODE_LCD ::                                              */
  1.2682 +  /*      This mode corresponds to horizontal RGB and BGR sub-pixel        */
  1.2683 +  /*      displays like LCD screens.  It produces 8-bit bitmaps that are   */
  1.2684 +  /*      3~times the width of the original glyph outline in pixels, and   */
  1.2685 +  /*      which use the @FT_PIXEL_MODE_LCD mode.                           */
  1.2686 +  /*                                                                       */
  1.2687 +  /*    FT_RENDER_MODE_LCD_V ::                                            */
  1.2688 +  /*      This mode corresponds to vertical RGB and BGR sub-pixel displays */
  1.2689 +  /*      (like PDA screens, rotated LCD displays, etc.).  It produces     */
  1.2690 +  /*      8-bit bitmaps that are 3~times the height of the original        */
  1.2691 +  /*      glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode.   */
  1.2692 +  /*                                                                       */
  1.2693 +  /* <Note>                                                                */
  1.2694 +  /*    The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be */
  1.2695 +  /*    filtered to reduce color-fringes by using @FT_Library_SetLcdFilter */
  1.2696 +  /*    (not active in the default builds).  It is up to the caller to     */
  1.2697 +  /*    either call @FT_Library_SetLcdFilter (if available) or do the      */
  1.2698 +  /*    filtering itself.                                                  */
  1.2699 +  /*                                                                       */
  1.2700 +  /*    The selected render mode only affects vector glyphs of a font.     */
  1.2701 +  /*    Embedded bitmaps often have a different pixel mode like            */
  1.2702 +  /*    @FT_PIXEL_MODE_MONO.  You can use @FT_Bitmap_Convert to transform  */
  1.2703 +  /*    them into 8-bit pixmaps.                                           */
  1.2704 +  /*                                                                       */
  1.2705 +  typedef enum  FT_Render_Mode_
  1.2706 +  {
  1.2707 +    FT_RENDER_MODE_NORMAL = 0,
  1.2708 +    FT_RENDER_MODE_LIGHT,
  1.2709 +    FT_RENDER_MODE_MONO,
  1.2710 +    FT_RENDER_MODE_LCD,
  1.2711 +    FT_RENDER_MODE_LCD_V,
  1.2712 +
  1.2713 +    FT_RENDER_MODE_MAX
  1.2714 +
  1.2715 +  } FT_Render_Mode;
  1.2716 +
  1.2717 +
  1.2718 +  /*************************************************************************/
  1.2719 +  /*                                                                       */
  1.2720 +  /* <Enum>                                                                */
  1.2721 +  /*    ft_render_mode_xxx                                                 */
  1.2722 +  /*                                                                       */
  1.2723 +  /* <Description>                                                         */
  1.2724 +  /*    These constants are deprecated.  Use the corresponding             */
  1.2725 +  /*    @FT_Render_Mode values instead.                                    */
  1.2726 +  /*                                                                       */
  1.2727 +  /* <Values>                                                              */
  1.2728 +  /*    ft_render_mode_normal :: see @FT_RENDER_MODE_NORMAL                */
  1.2729 +  /*    ft_render_mode_mono   :: see @FT_RENDER_MODE_MONO                  */
  1.2730 +  /*                                                                       */
  1.2731 +#define ft_render_mode_normal  FT_RENDER_MODE_NORMAL
  1.2732 +#define ft_render_mode_mono    FT_RENDER_MODE_MONO
  1.2733 +
  1.2734 +
  1.2735 +  /*************************************************************************/
  1.2736 +  /*                                                                       */
  1.2737 +  /* <Function>                                                            */
  1.2738 +  /*    FT_Render_Glyph                                                    */
  1.2739 +  /*                                                                       */
  1.2740 +  /* <Description>                                                         */
  1.2741 +  /*    Convert a given glyph image to a bitmap.  It does so by inspecting */
  1.2742 +  /*    the glyph image format, finding the relevant renderer, and         */
  1.2743 +  /*    invoking it.                                                       */
  1.2744 +  /*                                                                       */
  1.2745 +  /* <InOut>                                                               */
  1.2746 +  /*    slot        :: A handle to the glyph slot containing the image to  */
  1.2747 +  /*                   convert.                                            */
  1.2748 +  /*                                                                       */
  1.2749 +  /* <Input>                                                               */
  1.2750 +  /*    render_mode :: This is the render mode used to render the glyph    */
  1.2751 +  /*                   image into a bitmap.  See @FT_Render_Mode for a     */
  1.2752 +  /*                   list of possible values.                            */
  1.2753 +  /*                                                                       */
  1.2754 +  /* <Return>                                                              */
  1.2755 +  /*    FreeType error code.  0~means success.                             */
  1.2756 +  /*                                                                       */
  1.2757 +  FT_EXPORT( FT_Error )
  1.2758 +  FT_Render_Glyph( FT_GlyphSlot    slot,
  1.2759 +                   FT_Render_Mode  render_mode );
  1.2760 +
  1.2761 +
  1.2762 +  /*************************************************************************/
  1.2763 +  /*                                                                       */
  1.2764 +  /* <Enum>                                                                */
  1.2765 +  /*    FT_Kerning_Mode                                                    */
  1.2766 +  /*                                                                       */
  1.2767 +  /* <Description>                                                         */
  1.2768 +  /*    An enumeration used to specify which kerning values to return in   */
  1.2769 +  /*    @FT_Get_Kerning.                                                   */
  1.2770 +  /*                                                                       */
  1.2771 +  /* <Values>                                                              */
  1.2772 +  /*    FT_KERNING_DEFAULT  :: Return scaled and grid-fitted kerning       */
  1.2773 +  /*                           distances (value is~0).                     */
  1.2774 +  /*                                                                       */
  1.2775 +  /*    FT_KERNING_UNFITTED :: Return scaled but un-grid-fitted kerning    */
  1.2776 +  /*                           distances.                                  */
  1.2777 +  /*                                                                       */
  1.2778 +  /*    FT_KERNING_UNSCALED :: Return the kerning vector in original font  */
  1.2779 +  /*                           units.                                      */
  1.2780 +  /*                                                                       */
  1.2781 +  typedef enum  FT_Kerning_Mode_
  1.2782 +  {
  1.2783 +    FT_KERNING_DEFAULT  = 0,
  1.2784 +    FT_KERNING_UNFITTED,
  1.2785 +    FT_KERNING_UNSCALED
  1.2786 +
  1.2787 +  } FT_Kerning_Mode;
  1.2788 +
  1.2789 +
  1.2790 +  /*************************************************************************/
  1.2791 +  /*                                                                       */
  1.2792 +  /* <Const>                                                               */
  1.2793 +  /*    ft_kerning_default                                                 */
  1.2794 +  /*                                                                       */
  1.2795 +  /* <Description>                                                         */
  1.2796 +  /*    This constant is deprecated.  Please use @FT_KERNING_DEFAULT       */
  1.2797 +  /*    instead.                                                           */
  1.2798 +  /*                                                                       */
  1.2799 +#define ft_kerning_default   FT_KERNING_DEFAULT
  1.2800 +
  1.2801 +
  1.2802 +  /*************************************************************************/
  1.2803 +  /*                                                                       */
  1.2804 +  /* <Const>                                                               */
  1.2805 +  /*    ft_kerning_unfitted                                                */
  1.2806 +  /*                                                                       */
  1.2807 +  /* <Description>                                                         */
  1.2808 +  /*    This constant is deprecated.  Please use @FT_KERNING_UNFITTED      */
  1.2809 +  /*    instead.                                                           */
  1.2810 +  /*                                                                       */
  1.2811 +#define ft_kerning_unfitted  FT_KERNING_UNFITTED
  1.2812 +
  1.2813 +
  1.2814 +  /*************************************************************************/
  1.2815 +  /*                                                                       */
  1.2816 +  /* <Const>                                                               */
  1.2817 +  /*    ft_kerning_unscaled                                                */
  1.2818 +  /*                                                                       */
  1.2819 +  /* <Description>                                                         */
  1.2820 +  /*    This constant is deprecated.  Please use @FT_KERNING_UNSCALED      */
  1.2821 +  /*    instead.                                                           */
  1.2822 +  /*                                                                       */
  1.2823 +#define ft_kerning_unscaled  FT_KERNING_UNSCALED
  1.2824 +
  1.2825 +
  1.2826 +  /*************************************************************************/
  1.2827 +  /*                                                                       */
  1.2828 +  /* <Function>                                                            */
  1.2829 +  /*    FT_Get_Kerning                                                     */
  1.2830 +  /*                                                                       */
  1.2831 +  /* <Description>                                                         */
  1.2832 +  /*    Return the kerning vector between two glyphs of a same face.       */
  1.2833 +  /*                                                                       */
  1.2834 +  /* <Input>                                                               */
  1.2835 +  /*    face        :: A handle to a source face object.                   */
  1.2836 +  /*                                                                       */
  1.2837 +  /*    left_glyph  :: The index of the left glyph in the kern pair.       */
  1.2838 +  /*                                                                       */
  1.2839 +  /*    right_glyph :: The index of the right glyph in the kern pair.      */
  1.2840 +  /*                                                                       */
  1.2841 +  /*    kern_mode   :: See @FT_Kerning_Mode for more information.          */
  1.2842 +  /*                   Determines the scale and dimension of the returned  */
  1.2843 +  /*                   kerning vector.                                     */
  1.2844 +  /*                                                                       */
  1.2845 +  /* <Output>                                                              */
  1.2846 +  /*    akerning    :: The kerning vector.  This is either in font units   */
  1.2847 +  /*                   or in pixels (26.6 format) for scalable formats,    */
  1.2848 +  /*                   and in pixels for fixed-sizes formats.              */
  1.2849 +  /*                                                                       */
  1.2850 +  /* <Return>                                                              */
  1.2851 +  /*    FreeType error code.  0~means success.                             */
  1.2852 +  /*                                                                       */
  1.2853 +  /* <Note>                                                                */
  1.2854 +  /*    Only horizontal layouts (left-to-right & right-to-left) are        */
  1.2855 +  /*    supported by this method.  Other layouts, or more sophisticated    */
  1.2856 +  /*    kernings, are out of the scope of this API function -- they can be */
  1.2857 +  /*    implemented through format-specific interfaces.                    */
  1.2858 +  /*                                                                       */
  1.2859 +  FT_EXPORT( FT_Error )
  1.2860 +  FT_Get_Kerning( FT_Face     face,
  1.2861 +                  FT_UInt     left_glyph,
  1.2862 +                  FT_UInt     right_glyph,
  1.2863 +                  FT_UInt     kern_mode,
  1.2864 +                  FT_Vector  *akerning );
  1.2865 +
  1.2866 +
  1.2867 +  /*************************************************************************/
  1.2868 +  /*                                                                       */
  1.2869 +  /* <Function>                                                            */
  1.2870 +  /*    FT_Get_Track_Kerning                                               */
  1.2871 +  /*                                                                       */
  1.2872 +  /* <Description>                                                         */
  1.2873 +  /*    Return the track kerning for a given face object at a given size.  */
  1.2874 +  /*                                                                       */
  1.2875 +  /* <Input>                                                               */
  1.2876 +  /*    face       :: A handle to a source face object.                    */
  1.2877 +  /*                                                                       */
  1.2878 +  /*    point_size :: The point size in 16.16 fractional points.           */
  1.2879 +  /*                                                                       */
  1.2880 +  /*    degree     :: The degree of tightness.                             */
  1.2881 +  /*                                                                       */
  1.2882 +  /* <Output>                                                              */
  1.2883 +  /*    akerning   :: The kerning in 16.16 fractional points.              */
  1.2884 +  /*                                                                       */
  1.2885 +  /* <Return>                                                              */
  1.2886 +  /*    FreeType error code.  0~means success.                             */
  1.2887 +  /*                                                                       */
  1.2888 +  FT_EXPORT( FT_Error )
  1.2889 +  FT_Get_Track_Kerning( FT_Face    face,
  1.2890 +                        FT_Fixed   point_size,
  1.2891 +                        FT_Int     degree,
  1.2892 +                        FT_Fixed*  akerning );
  1.2893 +
  1.2894 +
  1.2895 +  /*************************************************************************/
  1.2896 +  /*                                                                       */
  1.2897 +  /* <Function>                                                            */
  1.2898 +  /*    FT_Get_Glyph_Name                                                  */
  1.2899 +  /*                                                                       */
  1.2900 +  /* <Description>                                                         */
  1.2901 +  /*    Retrieve the ASCII name of a given glyph in a face.  This only     */
  1.2902 +  /*    works for those faces where @FT_HAS_GLYPH_NAMES(face) returns~1.   */
  1.2903 +  /*                                                                       */
  1.2904 +  /* <Input>                                                               */
  1.2905 +  /*    face        :: A handle to a source face object.                   */
  1.2906 +  /*                                                                       */
  1.2907 +  /*    glyph_index :: The glyph index.                                    */
  1.2908 +  /*                                                                       */
  1.2909 +  /*    buffer_max  :: The maximal number of bytes available in the        */
  1.2910 +  /*                   buffer.                                             */
  1.2911 +  /*                                                                       */
  1.2912 +  /* <Output>                                                              */
  1.2913 +  /*    buffer      :: A pointer to a target buffer where the name is      */
  1.2914 +  /*                   copied to.                                          */
  1.2915 +  /*                                                                       */
  1.2916 +  /* <Return>                                                              */
  1.2917 +  /*    FreeType error code.  0~means success.                             */
  1.2918 +  /*                                                                       */
  1.2919 +  /* <Note>                                                                */
  1.2920 +  /*    An error is returned if the face doesn't provide glyph names or if */
  1.2921 +  /*    the glyph index is invalid.  In all cases of failure, the first    */
  1.2922 +  /*    byte of `buffer' is set to~0 to indicate an empty name.            */
  1.2923 +  /*                                                                       */
  1.2924 +  /*    The glyph name is truncated to fit within the buffer if it is too  */
  1.2925 +  /*    long.  The returned string is always zero-terminated.              */
  1.2926 +  /*                                                                       */
  1.2927 +  /*    This function is not compiled within the library if the config     */
  1.2928 +  /*    macro `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is defined in              */
  1.2929 +  /*    `include/freetype/config/ftoptions.h'.                             */
  1.2930 +  /*                                                                       */
  1.2931 +  FT_EXPORT( FT_Error )
  1.2932 +  FT_Get_Glyph_Name( FT_Face     face,
  1.2933 +                     FT_UInt     glyph_index,
  1.2934 +                     FT_Pointer  buffer,
  1.2935 +                     FT_UInt     buffer_max );
  1.2936 +
  1.2937 +
  1.2938 +  /*************************************************************************/
  1.2939 +  /*                                                                       */
  1.2940 +  /* <Function>                                                            */
  1.2941 +  /*    FT_Get_Postscript_Name                                             */
  1.2942 +  /*                                                                       */
  1.2943 +  /* <Description>                                                         */
  1.2944 +  /*    Retrieve the ASCII PostScript name of a given face, if available.  */
  1.2945 +  /*    This only works with PostScript and TrueType fonts.                */
  1.2946 +  /*                                                                       */
  1.2947 +  /* <Input>                                                               */
  1.2948 +  /*    face :: A handle to the source face object.                        */
  1.2949 +  /*                                                                       */
  1.2950 +  /* <Return>                                                              */
  1.2951 +  /*    A pointer to the face's PostScript name.  NULL if unavailable.     */
  1.2952 +  /*                                                                       */
  1.2953 +  /* <Note>                                                                */
  1.2954 +  /*    The returned pointer is owned by the face and is destroyed with    */
  1.2955 +  /*    it.                                                                */
  1.2956 +  /*                                                                       */
  1.2957 +  FT_EXPORT( const char* )
  1.2958 +  FT_Get_Postscript_Name( FT_Face  face );
  1.2959 +
  1.2960 +
  1.2961 +  /*************************************************************************/
  1.2962 +  /*                                                                       */
  1.2963 +  /* <Function>                                                            */
  1.2964 +  /*    FT_Select_Charmap                                                  */
  1.2965 +  /*                                                                       */
  1.2966 +  /* <Description>                                                         */
  1.2967 +  /*    Select a given charmap by its encoding tag (as listed in           */
  1.2968 +  /*    `freetype.h').                                                     */
  1.2969 +  /*                                                                       */
  1.2970 +  /* <InOut>                                                               */
  1.2971 +  /*    face     :: A handle to the source face object.                    */
  1.2972 +  /*                                                                       */
  1.2973 +  /* <Input>                                                               */
  1.2974 +  /*    encoding :: A handle to the selected encoding.                     */
  1.2975 +  /*                                                                       */
  1.2976 +  /* <Return>                                                              */
  1.2977 +  /*    FreeType error code.  0~means success.                             */
  1.2978 +  /*                                                                       */
  1.2979 +  /* <Note>                                                                */
  1.2980 +  /*    This function returns an error if no charmap in the face           */
  1.2981 +  /*    corresponds to the encoding queried here.                          */
  1.2982 +  /*                                                                       */
  1.2983 +  /*    Because many fonts contain more than a single cmap for Unicode     */
  1.2984 +  /*    encoding, this function has some special code to select the one    */
  1.2985 +  /*    which covers Unicode best (`best' in the sense that a UCS-4 cmap   */
  1.2986 +  /*    is preferred to a UCS-2 cmap).  It is thus preferable to           */
  1.2987 +  /*    @FT_Set_Charmap in this case.                                      */
  1.2988 +  /*                                                                       */
  1.2989 +  FT_EXPORT( FT_Error )
  1.2990 +  FT_Select_Charmap( FT_Face      face,
  1.2991 +                     FT_Encoding  encoding );
  1.2992 +
  1.2993 +
  1.2994 +  /*************************************************************************/
  1.2995 +  /*                                                                       */
  1.2996 +  /* <Function>                                                            */
  1.2997 +  /*    FT_Set_Charmap                                                     */
  1.2998 +  /*                                                                       */
  1.2999 +  /* <Description>                                                         */
  1.3000 +  /*    Select a given charmap for character code to glyph index mapping.  */
  1.3001 +  /*                                                                       */
  1.3002 +  /* <InOut>                                                               */
  1.3003 +  /*    face    :: A handle to the source face object.                     */
  1.3004 +  /*                                                                       */
  1.3005 +  /* <Input>                                                               */
  1.3006 +  /*    charmap :: A handle to the selected charmap.                       */
  1.3007 +  /*                                                                       */
  1.3008 +  /* <Return>                                                              */
  1.3009 +  /*    FreeType error code.  0~means success.                             */
  1.3010 +  /*                                                                       */
  1.3011 +  /* <Note>                                                                */
  1.3012 +  /*    This function returns an error if the charmap is not part of       */
  1.3013 +  /*    the face (i.e., if it is not listed in the `face->charmaps'        */
  1.3014 +  /*    table).                                                            */
  1.3015 +  /*                                                                       */
  1.3016 +  /*    It also fails if a type~14 charmap is selected.                    */
  1.3017 +  /*                                                                       */
  1.3018 +  FT_EXPORT( FT_Error )
  1.3019 +  FT_Set_Charmap( FT_Face     face,
  1.3020 +                  FT_CharMap  charmap );
  1.3021 +
  1.3022 +
  1.3023 +  /*************************************************************************
  1.3024 +   *
  1.3025 +   * @function:
  1.3026 +   *   FT_Get_Charmap_Index
  1.3027 +   *
  1.3028 +   * @description:
  1.3029 +   *   Retrieve index of a given charmap.
  1.3030 +   *
  1.3031 +   * @input:
  1.3032 +   *   charmap ::
  1.3033 +   *     A handle to a charmap.
  1.3034 +   *
  1.3035 +   * @return:
  1.3036 +   *   The index into the array of character maps within the face to which
  1.3037 +   *   `charmap' belongs.  If an error occurs, -1 is returned.
  1.3038 +   *
  1.3039 +   */
  1.3040 +  FT_EXPORT( FT_Int )
  1.3041 +  FT_Get_Charmap_Index( FT_CharMap  charmap );
  1.3042 +
  1.3043 +
  1.3044 +  /*************************************************************************/
  1.3045 +  /*                                                                       */
  1.3046 +  /* <Function>                                                            */
  1.3047 +  /*    FT_Get_Char_Index                                                  */
  1.3048 +  /*                                                                       */
  1.3049 +  /* <Description>                                                         */
  1.3050 +  /*    Return the glyph index of a given character code.  This function   */
  1.3051 +  /*    uses a charmap object to do the mapping.                           */
  1.3052 +  /*                                                                       */
  1.3053 +  /* <Input>                                                               */
  1.3054 +  /*    face     :: A handle to the source face object.                    */
  1.3055 +  /*                                                                       */
  1.3056 +  /*    charcode :: The character code.                                    */
  1.3057 +  /*                                                                       */
  1.3058 +  /* <Return>                                                              */
  1.3059 +  /*    The glyph index.  0~means `undefined character code'.              */
  1.3060 +  /*                                                                       */
  1.3061 +  /* <Note>                                                                */
  1.3062 +  /*    If you use FreeType to manipulate the contents of font files       */
  1.3063 +  /*    directly, be aware that the glyph index returned by this function  */
  1.3064 +  /*    doesn't always correspond to the internal indices used within      */
  1.3065 +  /*    the file.  This is done to ensure that value~0 always corresponds  */
  1.3066 +  /*    to the `missing glyph'.                                            */
  1.3067 +  /*                                                                       */
  1.3068 +  FT_EXPORT( FT_UInt )
  1.3069 +  FT_Get_Char_Index( FT_Face   face,
  1.3070 +                     FT_ULong  charcode );
  1.3071 +
  1.3072 +
  1.3073 +  /*************************************************************************/
  1.3074 +  /*                                                                       */
  1.3075 +  /* <Function>                                                            */
  1.3076 +  /*    FT_Get_First_Char                                                  */
  1.3077 +  /*                                                                       */
  1.3078 +  /* <Description>                                                         */
  1.3079 +  /*    This function is used to return the first character code in the    */
  1.3080 +  /*    current charmap of a given face.  It also returns the              */
  1.3081 +  /*    corresponding glyph index.                                         */
  1.3082 +  /*                                                                       */
  1.3083 +  /* <Input>                                                               */
  1.3084 +  /*    face    :: A handle to the source face object.                     */
  1.3085 +  /*                                                                       */
  1.3086 +  /* <Output>                                                              */
  1.3087 +  /*    agindex :: Glyph index of first character code.  0~if charmap is   */
  1.3088 +  /*               empty.                                                  */
  1.3089 +  /*                                                                       */
  1.3090 +  /* <Return>                                                              */
  1.3091 +  /*    The charmap's first character code.                                */
  1.3092 +  /*                                                                       */
  1.3093 +  /* <Note>                                                                */
  1.3094 +  /*    You should use this function with @FT_Get_Next_Char to be able to  */
  1.3095 +  /*    parse all character codes available in a given charmap.  The code  */
  1.3096 +  /*    should look like this:                                             */
  1.3097 +  /*                                                                       */
  1.3098 +  /*    {                                                                  */
  1.3099 +  /*      FT_ULong  charcode;                                              */
  1.3100 +  /*      FT_UInt   gindex;                                                */
  1.3101 +  /*                                                                       */
  1.3102 +  /*                                                                       */
  1.3103 +  /*      charcode = FT_Get_First_Char( face, &gindex );                   */
  1.3104 +  /*      while ( gindex != 0 )                                            */
  1.3105 +  /*      {                                                                */
  1.3106 +  /*        ... do something with (charcode,gindex) pair ...               */
  1.3107 +  /*                                                                       */
  1.3108 +  /*        charcode = FT_Get_Next_Char( face, charcode, &gindex );        */
  1.3109 +  /*      }                                                                */
  1.3110 +  /*    }                                                                  */
  1.3111 +  /*                                                                       */
  1.3112 +  /*    Note that `*agindex' is set to~0 if the charmap is empty.  The     */
  1.3113 +  /*    result itself can be~0 in two cases: if the charmap is empty or    */
  1.3114 +  /*    if the value~0 is the first valid character code.                  */
  1.3115 +  /*                                                                       */
  1.3116 +  FT_EXPORT( FT_ULong )
  1.3117 +  FT_Get_First_Char( FT_Face   face,
  1.3118 +                     FT_UInt  *agindex );
  1.3119 +
  1.3120 +
  1.3121 +  /*************************************************************************/
  1.3122 +  /*                                                                       */
  1.3123 +  /* <Function>                                                            */
  1.3124 +  /*    FT_Get_Next_Char                                                   */
  1.3125 +  /*                                                                       */
  1.3126 +  /* <Description>                                                         */
  1.3127 +  /*    This function is used to return the next character code in the     */
  1.3128 +  /*    current charmap of a given face following the value `char_code',   */
  1.3129 +  /*    as well as the corresponding glyph index.                          */
  1.3130 +  /*                                                                       */
  1.3131 +  /* <Input>                                                               */
  1.3132 +  /*    face      :: A handle to the source face object.                   */
  1.3133 +  /*    char_code :: The starting character code.                          */
  1.3134 +  /*                                                                       */
  1.3135 +  /* <Output>                                                              */
  1.3136 +  /*    agindex   :: Glyph index of next character code.  0~if charmap     */
  1.3137 +  /*                 is empty.                                             */
  1.3138 +  /*                                                                       */
  1.3139 +  /* <Return>                                                              */
  1.3140 +  /*    The charmap's next character code.                                 */
  1.3141 +  /*                                                                       */
  1.3142 +  /* <Note>                                                                */
  1.3143 +  /*    You should use this function with @FT_Get_First_Char to walk       */
  1.3144 +  /*    over all character codes available in a given charmap.  See the    */
  1.3145 +  /*    note for this function for a simple code example.                  */
  1.3146 +  /*                                                                       */
  1.3147 +  /*    Note that `*agindex' is set to~0 when there are no more codes in   */
  1.3148 +  /*    the charmap.                                                       */
  1.3149 +  /*                                                                       */
  1.3150 +  FT_EXPORT( FT_ULong )
  1.3151 +  FT_Get_Next_Char( FT_Face    face,
  1.3152 +                    FT_ULong   char_code,
  1.3153 +                    FT_UInt   *agindex );
  1.3154 +
  1.3155 +
  1.3156 +  /*************************************************************************/
  1.3157 +  /*                                                                       */
  1.3158 +  /* <Function>                                                            */
  1.3159 +  /*    FT_Get_Name_Index                                                  */
  1.3160 +  /*                                                                       */
  1.3161 +  /* <Description>                                                         */
  1.3162 +  /*    Return the glyph index of a given glyph name.  This function uses  */
  1.3163 +  /*    driver specific objects to do the translation.                     */
  1.3164 +  /*                                                                       */
  1.3165 +  /* <Input>                                                               */
  1.3166 +  /*    face       :: A handle to the source face object.                  */
  1.3167 +  /*                                                                       */
  1.3168 +  /*    glyph_name :: The glyph name.                                      */
  1.3169 +  /*                                                                       */
  1.3170 +  /* <Return>                                                              */
  1.3171 +  /*    The glyph index.  0~means `undefined character code'.              */
  1.3172 +  /*                                                                       */
  1.3173 +  FT_EXPORT( FT_UInt )
  1.3174 +  FT_Get_Name_Index( FT_Face     face,
  1.3175 +                     FT_String*  glyph_name );
  1.3176 +
  1.3177 +
  1.3178 +  /*************************************************************************
  1.3179 +   *
  1.3180 +   * @macro:
  1.3181 +   *   FT_SUBGLYPH_FLAG_XXX
  1.3182 +   *
  1.3183 +   * @description:
  1.3184 +   *   A list of constants used to describe subglyphs.  Please refer to the
  1.3185 +   *   TrueType specification for the meaning of the various flags.
  1.3186 +   *
  1.3187 +   * @values:
  1.3188 +   *   FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS ::
  1.3189 +   *   FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES ::
  1.3190 +   *   FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID ::
  1.3191 +   *   FT_SUBGLYPH_FLAG_SCALE ::
  1.3192 +   *   FT_SUBGLYPH_FLAG_XY_SCALE ::
  1.3193 +   *   FT_SUBGLYPH_FLAG_2X2 ::
  1.3194 +   *   FT_SUBGLYPH_FLAG_USE_MY_METRICS ::
  1.3195 +   *
  1.3196 +   */
  1.3197 +#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS          1
  1.3198 +#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES      2
  1.3199 +#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID        4
  1.3200 +#define FT_SUBGLYPH_FLAG_SCALE                   8
  1.3201 +#define FT_SUBGLYPH_FLAG_XY_SCALE             0x40
  1.3202 +#define FT_SUBGLYPH_FLAG_2X2                  0x80
  1.3203 +#define FT_SUBGLYPH_FLAG_USE_MY_METRICS      0x200
  1.3204 +
  1.3205 +
  1.3206 +  /*************************************************************************
  1.3207 +   *
  1.3208 +   * @func:
  1.3209 +   *   FT_Get_SubGlyph_Info
  1.3210 +   *
  1.3211 +   * @description:
  1.3212 +   *   Retrieve a description of a given subglyph.  Only use it if
  1.3213 +   *   `glyph->format' is @FT_GLYPH_FORMAT_COMPOSITE; an error is
  1.3214 +   *   returned otherwise.
  1.3215 +   *
  1.3216 +   * @input:
  1.3217 +   *   glyph ::
  1.3218 +   *     The source glyph slot.
  1.3219 +   *
  1.3220 +   *   sub_index ::
  1.3221 +   *     The index of the subglyph.  Must be less than
  1.3222 +   *     `glyph->num_subglyphs'.
  1.3223 +   *
  1.3224 +   * @output:
  1.3225 +   *   p_index ::
  1.3226 +   *     The glyph index of the subglyph.
  1.3227 +   *
  1.3228 +   *   p_flags ::
  1.3229 +   *     The subglyph flags, see @FT_SUBGLYPH_FLAG_XXX.
  1.3230 +   *
  1.3231 +   *   p_arg1 ::
  1.3232 +   *     The subglyph's first argument (if any).
  1.3233 +   *
  1.3234 +   *   p_arg2 ::
  1.3235 +   *     The subglyph's second argument (if any).
  1.3236 +   *
  1.3237 +   *   p_transform ::
  1.3238 +   *     The subglyph transformation (if any).
  1.3239 +   *
  1.3240 +   * @return:
  1.3241 +   *   FreeType error code.  0~means success.
  1.3242 +   *
  1.3243 +   * @note:
  1.3244 +   *   The values of `*p_arg1', `*p_arg2', and `*p_transform' must be
  1.3245 +   *   interpreted depending on the flags returned in `*p_flags'.  See the
  1.3246 +   *   TrueType specification for details.
  1.3247 +   *
  1.3248 +   */
  1.3249 +  FT_EXPORT( FT_Error )
  1.3250 +  FT_Get_SubGlyph_Info( FT_GlyphSlot  glyph,
  1.3251 +                        FT_UInt       sub_index,
  1.3252 +                        FT_Int       *p_index,
  1.3253 +                        FT_UInt      *p_flags,
  1.3254 +                        FT_Int       *p_arg1,
  1.3255 +                        FT_Int       *p_arg2,
  1.3256 +                        FT_Matrix    *p_transform );
  1.3257 +
  1.3258 +
  1.3259 +  /*************************************************************************/
  1.3260 +  /*                                                                       */
  1.3261 +  /* <Enum>                                                                */
  1.3262 +  /*    FT_FSTYPE_XXX                                                      */
  1.3263 +  /*                                                                       */
  1.3264 +  /* <Description>                                                         */
  1.3265 +  /*    A list of bit flags used in the `fsType' field of the OS/2 table   */
  1.3266 +  /*    in a TrueType or OpenType font and the `FSType' entry in a         */
  1.3267 +  /*    PostScript font.  These bit flags are returned by                  */
  1.3268 +  /*    @FT_Get_FSType_Flags; they inform client applications of embedding */
  1.3269 +  /*    and subsetting restrictions associated with a font.                */
  1.3270 +  /*                                                                       */
  1.3271 +  /*    See http://www.adobe.com/devnet/acrobat/pdfs/FontPolicies.pdf for  */
  1.3272 +  /*    more details.                                                      */
  1.3273 +  /*                                                                       */
  1.3274 +  /* <Values>                                                              */
  1.3275 +  /*    FT_FSTYPE_INSTALLABLE_EMBEDDING ::                                 */
  1.3276 +  /*      Fonts with no fsType bit set may be embedded and permanently     */
  1.3277 +  /*      installed on the remote system by an application.                */
  1.3278 +  /*                                                                       */
  1.3279 +  /*    FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING ::                          */
  1.3280 +  /*      Fonts that have only this bit set must not be modified, embedded */
  1.3281 +  /*      or exchanged in any manner without first obtaining permission of */
  1.3282 +  /*      the font software copyright owner.                               */
  1.3283 +  /*                                                                       */
  1.3284 +  /*    FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING ::                           */
  1.3285 +  /*      If this bit is set, the font may be embedded and temporarily     */
  1.3286 +  /*      loaded on the remote system.  Documents containing Preview &     */
  1.3287 +  /*      Print fonts must be opened `read-only'; no edits can be applied  */
  1.3288 +  /*      to the document.                                                 */
  1.3289 +  /*                                                                       */
  1.3290 +  /*    FT_FSTYPE_EDITABLE_EMBEDDING ::                                    */
  1.3291 +  /*      If this bit is set, the font may be embedded but must only be    */
  1.3292 +  /*      installed temporarily on other systems.  In contrast to Preview  */
  1.3293 +  /*      & Print fonts, documents containing editable fonts may be opened */
  1.3294 +  /*      for reading, editing is permitted, and changes may be saved.     */
  1.3295 +  /*                                                                       */
  1.3296 +  /*    FT_FSTYPE_NO_SUBSETTING ::                                         */
  1.3297 +  /*      If this bit is set, the font may not be subsetted prior to       */
  1.3298 +  /*      embedding.                                                       */
  1.3299 +  /*                                                                       */
  1.3300 +  /*    FT_FSTYPE_BITMAP_EMBEDDING_ONLY ::                                 */
  1.3301 +  /*      If this bit is set, only bitmaps contained in the font may be    */
  1.3302 +  /*      embedded; no outline data may be embedded.  If there are no      */
  1.3303 +  /*      bitmaps available in the font, then the font is unembeddable.    */
  1.3304 +  /*                                                                       */
  1.3305 +  /* <Note>                                                                */
  1.3306 +  /*    While the fsType flags can indicate that a font may be embedded, a */
  1.3307 +  /*    license with the font vendor may be separately required to use the */
  1.3308 +  /*    font in this way.                                                  */
  1.3309 +  /*                                                                       */
  1.3310 +#define FT_FSTYPE_INSTALLABLE_EMBEDDING         0x0000
  1.3311 +#define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING  0x0002
  1.3312 +#define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING   0x0004
  1.3313 +#define FT_FSTYPE_EDITABLE_EMBEDDING            0x0008
  1.3314 +#define FT_FSTYPE_NO_SUBSETTING                 0x0100
  1.3315 +#define FT_FSTYPE_BITMAP_EMBEDDING_ONLY         0x0200
  1.3316 +
  1.3317 +
  1.3318 +  /*************************************************************************/
  1.3319 +  /*                                                                       */
  1.3320 +  /* <Function>                                                            */
  1.3321 +  /*    FT_Get_FSType_Flags                                                */
  1.3322 +  /*                                                                       */
  1.3323 +  /* <Description>                                                         */
  1.3324 +  /*    Return the fsType flags for a font.                                */
  1.3325 +  /*                                                                       */
  1.3326 +  /* <Input>                                                               */
  1.3327 +  /*    face :: A handle to the source face object.                        */
  1.3328 +  /*                                                                       */
  1.3329 +  /* <Return>                                                              */
  1.3330 +  /*    The fsType flags, @FT_FSTYPE_XXX.                                  */
  1.3331 +  /*                                                                       */
  1.3332 +  /* <Note>                                                                */
  1.3333 +  /*    Use this function rather than directly reading the `fs_type' field */
  1.3334 +  /*    in the @PS_FontInfoRec structure which is only guaranteed to       */
  1.3335 +  /*    return the correct results for Type~1 fonts.                       */
  1.3336 +  /*                                                                       */
  1.3337 +  FT_EXPORT( FT_UShort )
  1.3338 +  FT_Get_FSType_Flags( FT_Face  face );
  1.3339 +
  1.3340 +
  1.3341 +  /*************************************************************************/
  1.3342 +  /*                                                                       */
  1.3343 +  /* <Section>                                                             */
  1.3344 +  /*    glyph_variants                                                     */
  1.3345 +  /*                                                                       */
  1.3346 +  /* <Title>                                                               */
  1.3347 +  /*    Glyph Variants                                                     */
  1.3348 +  /*                                                                       */
  1.3349 +  /* <Abstract>                                                            */
  1.3350 +  /*    The FreeType~2 interface to Unicode Ideographic Variation          */
  1.3351 +  /*    Sequences (IVS), using the SFNT cmap format~14.                    */
  1.3352 +  /*                                                                       */
  1.3353 +  /* <Description>                                                         */
  1.3354 +  /*    Many CJK characters have variant forms.  They are a sort of grey   */
  1.3355 +  /*    area somewhere between being totally irrelevant and semantically   */
  1.3356 +  /*    distinct; for this reason, the Unicode consortium decided to       */
  1.3357 +  /*    introduce Ideographic Variation Sequences (IVS), consisting of a   */
  1.3358 +  /*    Unicode base character and one of 240 variant selectors            */
  1.3359 +  /*    (U+E0100-U+E01EF), instead of further extending the already huge   */
  1.3360 +  /*    code range for CJK characters.                                     */
  1.3361 +  /*                                                                       */
  1.3362 +  /*    An IVS is registered and unique; for further details please refer  */
  1.3363 +  /*    to Unicode Technical Report #37, the Ideographic Variation         */
  1.3364 +  /*    Database.  To date (October 2007), the character with the most     */
  1.3365 +  /*    variants is U+908A, having 8~such IVS.                             */
  1.3366 +  /*                                                                       */
  1.3367 +  /*    Adobe and MS decided to support IVS with a new cmap subtable       */
  1.3368 +  /*    (format~14).  It is an odd subtable because it is not a mapping of */
  1.3369 +  /*    input code points to glyphs, but contains lists of all variants    */
  1.3370 +  /*    supported by the font.                                             */
  1.3371 +  /*                                                                       */
  1.3372 +  /*    A variant may be either `default' or `non-default'.  A default     */
  1.3373 +  /*    variant is the one you will get for that code point if you look it */
  1.3374 +  /*    up in the standard Unicode cmap.  A non-default variant is a       */
  1.3375 +  /*    different glyph.                                                   */
  1.3376 +  /*                                                                       */
  1.3377 +  /*************************************************************************/
  1.3378 +
  1.3379 +
  1.3380 +  /*************************************************************************/
  1.3381 +  /*                                                                       */
  1.3382 +  /* <Function>                                                            */
  1.3383 +  /*    FT_Face_GetCharVariantIndex                                        */
  1.3384 +  /*                                                                       */
  1.3385 +  /* <Description>                                                         */
  1.3386 +  /*    Return the glyph index of a given character code as modified by    */
  1.3387 +  /*    the variation selector.                                            */
  1.3388 +  /*                                                                       */
  1.3389 +  /* <Input>                                                               */
  1.3390 +  /*    face ::                                                            */
  1.3391 +  /*      A handle to the source face object.                              */
  1.3392 +  /*                                                                       */
  1.3393 +  /*    charcode ::                                                        */
  1.3394 +  /*      The character code point in Unicode.                             */
  1.3395 +  /*                                                                       */
  1.3396 +  /*    variantSelector ::                                                 */
  1.3397 +  /*      The Unicode code point of the variation selector.                */
  1.3398 +  /*                                                                       */
  1.3399 +  /* <Return>                                                              */
  1.3400 +  /*    The glyph index.  0~means either `undefined character code', or    */
  1.3401 +  /*    `undefined selector code', or `no variation selector cmap          */
  1.3402 +  /*    subtable', or `current CharMap is not Unicode'.                    */
  1.3403 +  /*                                                                       */
  1.3404 +  /* <Note>                                                                */
  1.3405 +  /*    If you use FreeType to manipulate the contents of font files       */
  1.3406 +  /*    directly, be aware that the glyph index returned by this function  */
  1.3407 +  /*    doesn't always correspond to the internal indices used within      */
  1.3408 +  /*    the file.  This is done to ensure that value~0 always corresponds  */
  1.3409 +  /*    to the `missing glyph'.                                            */
  1.3410 +  /*                                                                       */
  1.3411 +  /*    This function is only meaningful if                                */
  1.3412 +  /*      a) the font has a variation selector cmap sub table,             */
  1.3413 +  /*    and                                                                */
  1.3414 +  /*      b) the current charmap has a Unicode encoding.                   */
  1.3415 +  /*                                                                       */
  1.3416 +  /* <Since>                                                               */
  1.3417 +  /*    2.3.6                                                              */
  1.3418 +  /*                                                                       */
  1.3419 +  FT_EXPORT( FT_UInt )
  1.3420 +  FT_Face_GetCharVariantIndex( FT_Face   face,
  1.3421 +                               FT_ULong  charcode,
  1.3422 +                               FT_ULong  variantSelector );
  1.3423 +
  1.3424 +
  1.3425 +  /*************************************************************************/
  1.3426 +  /*                                                                       */
  1.3427 +  /* <Function>                                                            */
  1.3428 +  /*    FT_Face_GetCharVariantIsDefault                                    */
  1.3429 +  /*                                                                       */
  1.3430 +  /* <Description>                                                         */
  1.3431 +  /*    Check whether this variant of this Unicode character is the one to */
  1.3432 +  /*    be found in the `cmap'.                                            */
  1.3433 +  /*                                                                       */
  1.3434 +  /* <Input>                                                               */
  1.3435 +  /*    face ::                                                            */
  1.3436 +  /*      A handle to the source face object.                              */
  1.3437 +  /*                                                                       */
  1.3438 +  /*    charcode ::                                                        */
  1.3439 +  /*      The character codepoint in Unicode.                              */
  1.3440 +  /*                                                                       */
  1.3441 +  /*    variantSelector ::                                                 */
  1.3442 +  /*      The Unicode codepoint of the variation selector.                 */
  1.3443 +  /*                                                                       */
  1.3444 +  /* <Return>                                                              */
  1.3445 +  /*    1~if found in the standard (Unicode) cmap, 0~if found in the       */
  1.3446 +  /*    variation selector cmap, or -1 if it is not a variant.             */
  1.3447 +  /*                                                                       */
  1.3448 +  /* <Note>                                                                */
  1.3449 +  /*    This function is only meaningful if the font has a variation       */
  1.3450 +  /*    selector cmap subtable.                                            */
  1.3451 +  /*                                                                       */
  1.3452 +  /* <Since>                                                               */
  1.3453 +  /*    2.3.6                                                              */
  1.3454 +  /*                                                                       */
  1.3455 +  FT_EXPORT( FT_Int )
  1.3456 +  FT_Face_GetCharVariantIsDefault( FT_Face   face,
  1.3457 +                                   FT_ULong  charcode,
  1.3458 +                                   FT_ULong  variantSelector );
  1.3459 +
  1.3460 +
  1.3461 +  /*************************************************************************/
  1.3462 +  /*                                                                       */
  1.3463 +  /* <Function>                                                            */
  1.3464 +  /*    FT_Face_GetVariantSelectors                                        */
  1.3465 +  /*                                                                       */
  1.3466 +  /* <Description>                                                         */
  1.3467 +  /*    Return a zero-terminated list of Unicode variant selectors found   */
  1.3468 +  /*    in the font.                                                       */
  1.3469 +  /*                                                                       */
  1.3470 +  /* <Input>                                                               */
  1.3471 +  /*    face ::                                                            */
  1.3472 +  /*      A handle to the source face object.                              */
  1.3473 +  /*                                                                       */
  1.3474 +  /* <Return>                                                              */
  1.3475 +  /*    A pointer to an array of selector code points, or NULL if there is */
  1.3476 +  /*    no valid variant selector cmap subtable.                           */
  1.3477 +  /*                                                                       */
  1.3478 +  /* <Note>                                                                */
  1.3479 +  /*    The last item in the array is~0; the array is owned by the         */
  1.3480 +  /*    @FT_Face object but can be overwritten or released on the next     */
  1.3481 +  /*    call to a FreeType function.                                       */
  1.3482 +  /*                                                                       */
  1.3483 +  /* <Since>                                                               */
  1.3484 +  /*    2.3.6                                                              */
  1.3485 +  /*                                                                       */
  1.3486 +  FT_EXPORT( FT_UInt32* )
  1.3487 +  FT_Face_GetVariantSelectors( FT_Face  face );
  1.3488 +
  1.3489 +
  1.3490 +  /*************************************************************************/
  1.3491 +  /*                                                                       */
  1.3492 +  /* <Function>                                                            */
  1.3493 +  /*    FT_Face_GetVariantsOfChar                                          */
  1.3494 +  /*                                                                       */
  1.3495 +  /* <Description>                                                         */
  1.3496 +  /*    Return a zero-terminated list of Unicode variant selectors found   */
  1.3497 +  /*    for the specified character code.                                  */
  1.3498 +  /*                                                                       */
  1.3499 +  /* <Input>                                                               */
  1.3500 +  /*    face ::                                                            */
  1.3501 +  /*      A handle to the source face object.                              */
  1.3502 +  /*                                                                       */
  1.3503 +  /*    charcode ::                                                        */
  1.3504 +  /*      The character codepoint in Unicode.                              */
  1.3505 +  /*                                                                       */
  1.3506 +  /* <Return>                                                              */
  1.3507 +  /*    A pointer to an array of variant selector code points which are    */
  1.3508 +  /*    active for the given character, or NULL if the corresponding list  */
  1.3509 +  /*    is empty.                                                          */
  1.3510 +  /*                                                                       */
  1.3511 +  /* <Note>                                                                */
  1.3512 +  /*    The last item in the array is~0; the array is owned by the         */
  1.3513 +  /*    @FT_Face object but can be overwritten or released on the next     */
  1.3514 +  /*    call to a FreeType function.                                       */
  1.3515 +  /*                                                                       */
  1.3516 +  /* <Since>                                                               */
  1.3517 +  /*    2.3.6                                                              */
  1.3518 +  /*                                                                       */
  1.3519 +  FT_EXPORT( FT_UInt32* )
  1.3520 +  FT_Face_GetVariantsOfChar( FT_Face   face,
  1.3521 +                             FT_ULong  charcode );
  1.3522 +
  1.3523 +
  1.3524 +  /*************************************************************************/
  1.3525 +  /*                                                                       */
  1.3526 +  /* <Function>                                                            */
  1.3527 +  /*    FT_Face_GetCharsOfVariant                                          */
  1.3528 +  /*                                                                       */
  1.3529 +  /* <Description>                                                         */
  1.3530 +  /*    Return a zero-terminated list of Unicode character codes found for */
  1.3531 +  /*    the specified variant selector.                                    */
  1.3532 +  /*                                                                       */
  1.3533 +  /* <Input>                                                               */
  1.3534 +  /*    face ::                                                            */
  1.3535 +  /*      A handle to the source face object.                              */
  1.3536 +  /*                                                                       */
  1.3537 +  /*    variantSelector ::                                                 */
  1.3538 +  /*      The variant selector code point in Unicode.                      */
  1.3539 +  /*                                                                       */
  1.3540 +  /* <Return>                                                              */
  1.3541 +  /*    A list of all the code points which are specified by this selector */
  1.3542 +  /*    (both default and non-default codes are returned) or NULL if there */
  1.3543 +  /*    is no valid cmap or the variant selector is invalid.               */
  1.3544 +  /*                                                                       */
  1.3545 +  /* <Note>                                                                */
  1.3546 +  /*    The last item in the array is~0; the array is owned by the         */
  1.3547 +  /*    @FT_Face object but can be overwritten or released on the next     */
  1.3548 +  /*    call to a FreeType function.                                       */
  1.3549 +  /*                                                                       */
  1.3550 +  /* <Since>                                                               */
  1.3551 +  /*    2.3.6                                                              */
  1.3552 +  /*                                                                       */
  1.3553 +  FT_EXPORT( FT_UInt32* )
  1.3554 +  FT_Face_GetCharsOfVariant( FT_Face   face,
  1.3555 +                             FT_ULong  variantSelector );
  1.3556 +
  1.3557 +
  1.3558 +  /*************************************************************************/
  1.3559 +  /*                                                                       */
  1.3560 +  /* <Section>                                                             */
  1.3561 +  /*    computations                                                       */
  1.3562 +  /*                                                                       */
  1.3563 +  /* <Title>                                                               */
  1.3564 +  /*    Computations                                                       */
  1.3565 +  /*                                                                       */
  1.3566 +  /* <Abstract>                                                            */
  1.3567 +  /*    Crunching fixed numbers and vectors.                               */
  1.3568 +  /*                                                                       */
  1.3569 +  /* <Description>                                                         */
  1.3570 +  /*    This section contains various functions used to perform            */
  1.3571 +  /*    computations on 16.16 fixed-float numbers or 2d vectors.           */
  1.3572 +  /*                                                                       */
  1.3573 +  /* <Order>                                                               */
  1.3574 +  /*    FT_MulDiv                                                          */
  1.3575 +  /*    FT_MulFix                                                          */
  1.3576 +  /*    FT_DivFix                                                          */
  1.3577 +  /*    FT_RoundFix                                                        */
  1.3578 +  /*    FT_CeilFix                                                         */
  1.3579 +  /*    FT_FloorFix                                                        */
  1.3580 +  /*    FT_Vector_Transform                                                */
  1.3581 +  /*    FT_Matrix_Multiply                                                 */
  1.3582 +  /*    FT_Matrix_Invert                                                   */
  1.3583 +  /*                                                                       */
  1.3584 +  /*************************************************************************/
  1.3585 +
  1.3586 +
  1.3587 +  /*************************************************************************/
  1.3588 +  /*                                                                       */
  1.3589 +  /* <Function>                                                            */
  1.3590 +  /*    FT_MulDiv                                                          */
  1.3591 +  /*                                                                       */
  1.3592 +  /* <Description>                                                         */
  1.3593 +  /*    A very simple function used to perform the computation `(a*b)/c'   */
  1.3594 +  /*    with maximal accuracy (it uses a 64-bit intermediate integer       */
  1.3595 +  /*    whenever necessary).                                               */
  1.3596 +  /*                                                                       */
  1.3597 +  /*    This function isn't necessarily as fast as some processor specific */
  1.3598 +  /*    operations, but is at least completely portable.                   */
  1.3599 +  /*                                                                       */
  1.3600 +  /* <Input>                                                               */
  1.3601 +  /*    a :: The first multiplier.                                         */
  1.3602 +  /*    b :: The second multiplier.                                        */
  1.3603 +  /*    c :: The divisor.                                                  */
  1.3604 +  /*                                                                       */
  1.3605 +  /* <Return>                                                              */
  1.3606 +  /*    The result of `(a*b)/c'.  This function never traps when trying to */
  1.3607 +  /*    divide by zero; it simply returns `MaxInt' or `MinInt' depending   */
  1.3608 +  /*    on the signs of `a' and `b'.                                       */
  1.3609 +  /*                                                                       */
  1.3610 +  FT_EXPORT( FT_Long )
  1.3611 +  FT_MulDiv( FT_Long  a,
  1.3612 +             FT_Long  b,
  1.3613 +             FT_Long  c );
  1.3614 +
  1.3615 +
  1.3616 +  /* */
  1.3617 +
  1.3618 +  /* The following #if 0 ... #endif is for the documentation formatter, */
  1.3619 +  /* hiding the internal `FT_MULFIX_INLINED' macro.                     */
  1.3620 +
  1.3621 +#if 0
  1.3622 +  /*************************************************************************/
  1.3623 +  /*                                                                       */
  1.3624 +  /* <Function>                                                            */
  1.3625 +  /*    FT_MulFix                                                          */
  1.3626 +  /*                                                                       */
  1.3627 +  /* <Description>                                                         */
  1.3628 +  /*    A very simple function used to perform the computation             */
  1.3629 +  /*    `(a*b)/0x10000' with maximal accuracy.  Most of the time this is   */
  1.3630 +  /*    used to multiply a given value by a 16.16 fixed float factor.      */
  1.3631 +  /*                                                                       */
  1.3632 +  /* <Input>                                                               */
  1.3633 +  /*    a :: The first multiplier.                                         */
  1.3634 +  /*    b :: The second multiplier.  Use a 16.16 factor here whenever      */
  1.3635 +  /*         possible (see note below).                                    */
  1.3636 +  /*                                                                       */
  1.3637 +  /* <Return>                                                              */
  1.3638 +  /*    The result of `(a*b)/0x10000'.                                     */
  1.3639 +  /*                                                                       */
  1.3640 +  /* <Note>                                                                */
  1.3641 +  /*    This function has been optimized for the case where the absolute   */
  1.3642 +  /*    value of `a' is less than 2048, and `b' is a 16.16 scaling factor. */
  1.3643 +  /*    As this happens mainly when scaling from notional units to         */
  1.3644 +  /*    fractional pixels in FreeType, it resulted in noticeable speed     */
  1.3645 +  /*    improvements between versions 2.x and 1.x.                         */
  1.3646 +  /*                                                                       */
  1.3647 +  /*    As a conclusion, always try to place a 16.16 factor as the         */
  1.3648 +  /*    _second_ argument of this function; this can make a great          */
  1.3649 +  /*    difference.                                                        */
  1.3650 +  /*                                                                       */
  1.3651 +  FT_EXPORT( FT_Long )
  1.3652 +  FT_MulFix( FT_Long  a,
  1.3653 +             FT_Long  b );
  1.3654 +
  1.3655 +  /* */
  1.3656 +#endif
  1.3657 +
  1.3658 +#ifdef FT_MULFIX_INLINED
  1.3659 +#define FT_MulFix( a, b )  FT_MULFIX_INLINED( a, b )
  1.3660 +#else
  1.3661 +  FT_EXPORT( FT_Long )
  1.3662 +  FT_MulFix( FT_Long  a,
  1.3663 +             FT_Long  b );
  1.3664 +#endif
  1.3665 +
  1.3666 +
  1.3667 +  /*************************************************************************/
  1.3668 +  /*                                                                       */
  1.3669 +  /* <Function>                                                            */
  1.3670 +  /*    FT_DivFix                                                          */
  1.3671 +  /*                                                                       */
  1.3672 +  /* <Description>                                                         */
  1.3673 +  /*    A very simple function used to perform the computation             */
  1.3674 +  /*    `(a*0x10000)/b' with maximal accuracy.  Most of the time, this is  */
  1.3675 +  /*    used to divide a given value by a 16.16 fixed float factor.        */
  1.3676 +  /*                                                                       */
  1.3677 +  /* <Input>                                                               */
  1.3678 +  /*    a :: The first multiplier.                                         */
  1.3679 +  /*    b :: The second multiplier.  Use a 16.16 factor here whenever      */
  1.3680 +  /*         possible (see note below).                                    */
  1.3681 +  /*                                                                       */
  1.3682 +  /* <Return>                                                              */
  1.3683 +  /*    The result of `(a*0x10000)/b'.                                     */
  1.3684 +  /*                                                                       */
  1.3685 +  /* <Note>                                                                */
  1.3686 +  /*    The optimization for FT_DivFix() is simple: If (a~<<~16) fits in   */
  1.3687 +  /*    32~bits, then the division is computed directly.  Otherwise, we    */
  1.3688 +  /*    use a specialized version of @FT_MulDiv.                           */
  1.3689 +  /*                                                                       */
  1.3690 +  FT_EXPORT( FT_Long )
  1.3691 +  FT_DivFix( FT_Long  a,
  1.3692 +             FT_Long  b );
  1.3693 +
  1.3694 +
  1.3695 +  /*************************************************************************/
  1.3696 +  /*                                                                       */
  1.3697 +  /* <Function>                                                            */
  1.3698 +  /*    FT_RoundFix                                                        */
  1.3699 +  /*                                                                       */
  1.3700 +  /* <Description>                                                         */
  1.3701 +  /*    A very simple function used to round a 16.16 fixed number.         */
  1.3702 +  /*                                                                       */
  1.3703 +  /* <Input>                                                               */
  1.3704 +  /*    a :: The number to be rounded.                                     */
  1.3705 +  /*                                                                       */
  1.3706 +  /* <Return>                                                              */
  1.3707 +  /*    The result of `(a + 0x8000) & -0x10000'.                           */
  1.3708 +  /*                                                                       */
  1.3709 +  FT_EXPORT( FT_Fixed )
  1.3710 +  FT_RoundFix( FT_Fixed  a );
  1.3711 +
  1.3712 +
  1.3713 +  /*************************************************************************/
  1.3714 +  /*                                                                       */
  1.3715 +  /* <Function>                                                            */
  1.3716 +  /*    FT_CeilFix                                                         */
  1.3717 +  /*                                                                       */
  1.3718 +  /* <Description>                                                         */
  1.3719 +  /*    A very simple function used to compute the ceiling function of a   */
  1.3720 +  /*    16.16 fixed number.                                                */
  1.3721 +  /*                                                                       */
  1.3722 +  /* <Input>                                                               */
  1.3723 +  /*    a :: The number for which the ceiling function is to be computed.  */
  1.3724 +  /*                                                                       */
  1.3725 +  /* <Return>                                                              */
  1.3726 +  /*    The result of `(a + 0x10000 - 1) & -0x10000'.                      */
  1.3727 +  /*                                                                       */
  1.3728 +  FT_EXPORT( FT_Fixed )
  1.3729 +  FT_CeilFix( FT_Fixed  a );
  1.3730 +
  1.3731 +
  1.3732 +  /*************************************************************************/
  1.3733 +  /*                                                                       */
  1.3734 +  /* <Function>                                                            */
  1.3735 +  /*    FT_FloorFix                                                        */
  1.3736 +  /*                                                                       */
  1.3737 +  /* <Description>                                                         */
  1.3738 +  /*    A very simple function used to compute the floor function of a     */
  1.3739 +  /*    16.16 fixed number.                                                */
  1.3740 +  /*                                                                       */
  1.3741 +  /* <Input>                                                               */
  1.3742 +  /*    a :: The number for which the floor function is to be computed.    */
  1.3743 +  /*                                                                       */
  1.3744 +  /* <Return>                                                              */
  1.3745 +  /*    The result of `a & -0x10000'.                                      */
  1.3746 +  /*                                                                       */
  1.3747 +  FT_EXPORT( FT_Fixed )
  1.3748 +  FT_FloorFix( FT_Fixed  a );
  1.3749 +
  1.3750 +
  1.3751 +  /*************************************************************************/
  1.3752 +  /*                                                                       */
  1.3753 +  /* <Function>                                                            */
  1.3754 +  /*    FT_Vector_Transform                                                */
  1.3755 +  /*                                                                       */
  1.3756 +  /* <Description>                                                         */
  1.3757 +  /*    Transform a single vector through a 2x2 matrix.                    */
  1.3758 +  /*                                                                       */
  1.3759 +  /* <InOut>                                                               */
  1.3760 +  /*    vector :: The target vector to transform.                          */
  1.3761 +  /*                                                                       */
  1.3762 +  /* <Input>                                                               */
  1.3763 +  /*    matrix :: A pointer to the source 2x2 matrix.                      */
  1.3764 +  /*                                                                       */
  1.3765 +  /* <Note>                                                                */
  1.3766 +  /*    The result is undefined if either `vector' or `matrix' is invalid. */
  1.3767 +  /*                                                                       */
  1.3768 +  FT_EXPORT( void )
  1.3769 +  FT_Vector_Transform( FT_Vector*        vec,
  1.3770 +                       const FT_Matrix*  matrix );
  1.3771 +
  1.3772 +
  1.3773 +  /*************************************************************************/
  1.3774 +  /*                                                                       */
  1.3775 +  /* <Section>                                                             */
  1.3776 +  /*    version                                                            */
  1.3777 +  /*                                                                       */
  1.3778 +  /* <Title>                                                               */
  1.3779 +  /*    FreeType Version                                                   */
  1.3780 +  /*                                                                       */
  1.3781 +  /* <Abstract>                                                            */
  1.3782 +  /*    Functions and macros related to FreeType versions.                 */
  1.3783 +  /*                                                                       */
  1.3784 +  /* <Description>                                                         */
  1.3785 +  /*    Note that those functions and macros are of limited use because    */
  1.3786 +  /*    even a new release of FreeType with only documentation changes     */
  1.3787 +  /*    increases the version number.                                      */
  1.3788 +  /*                                                                       */
  1.3789 +  /*************************************************************************/
  1.3790 +
  1.3791 +
  1.3792 +  /*************************************************************************
  1.3793 +   *
  1.3794 +   * @enum:
  1.3795 +   *   FREETYPE_XXX
  1.3796 +   *
  1.3797 +   * @description:
  1.3798 +   *   These three macros identify the FreeType source code version.
  1.3799 +   *   Use @FT_Library_Version to access them at runtime.
  1.3800 +   *
  1.3801 +   * @values:
  1.3802 +   *   FREETYPE_MAJOR :: The major version number.
  1.3803 +   *   FREETYPE_MINOR :: The minor version number.
  1.3804 +   *   FREETYPE_PATCH :: The patch level.
  1.3805 +   *
  1.3806 +   * @note:
  1.3807 +   *   The version number of FreeType if built as a dynamic link library
  1.3808 +   *   with the `libtool' package is _not_ controlled by these three
  1.3809 +   *   macros.
  1.3810 +   *
  1.3811 +   */
  1.3812 +#define FREETYPE_MAJOR  2
  1.3813 +#define FREETYPE_MINOR  4
  1.3814 +#define FREETYPE_PATCH  4
  1.3815 +
  1.3816 +
  1.3817 +  /*************************************************************************/
  1.3818 +  /*                                                                       */
  1.3819 +  /* <Function>                                                            */
  1.3820 +  /*    FT_Library_Version                                                 */
  1.3821 +  /*                                                                       */
  1.3822 +  /* <Description>                                                         */
  1.3823 +  /*    Return the version of the FreeType library being used.  This is    */
  1.3824 +  /*    useful when dynamically linking to the library, since one cannot   */
  1.3825 +  /*    use the macros @FREETYPE_MAJOR, @FREETYPE_MINOR, and               */
  1.3826 +  /*    @FREETYPE_PATCH.                                                   */
  1.3827 +  /*                                                                       */
  1.3828 +  /* <Input>                                                               */
  1.3829 +  /*    library :: A source library handle.                                */
  1.3830 +  /*                                                                       */
  1.3831 +  /* <Output>                                                              */
  1.3832 +  /*    amajor  :: The major version number.                               */
  1.3833 +  /*                                                                       */
  1.3834 +  /*    aminor  :: The minor version number.                               */
  1.3835 +  /*                                                                       */
  1.3836 +  /*    apatch  :: The patch version number.                               */
  1.3837 +  /*                                                                       */
  1.3838 +  /* <Note>                                                                */
  1.3839 +  /*    The reason why this function takes a `library' argument is because */
  1.3840 +  /*    certain programs implement library initialization in a custom way  */
  1.3841 +  /*    that doesn't use @FT_Init_FreeType.                                */
  1.3842 +  /*                                                                       */
  1.3843 +  /*    In such cases, the library version might not be available before   */
  1.3844 +  /*    the library object has been created.                               */
  1.3845 +  /*                                                                       */
  1.3846 +  FT_EXPORT( void )
  1.3847 +  FT_Library_Version( FT_Library   library,
  1.3848 +                      FT_Int      *amajor,
  1.3849 +                      FT_Int      *aminor,
  1.3850 +                      FT_Int      *apatch );
  1.3851 +
  1.3852 +
  1.3853 +  /*************************************************************************/
  1.3854 +  /*                                                                       */
  1.3855 +  /* <Function>                                                            */
  1.3856 +  /*    FT_Face_CheckTrueTypePatents                                       */
  1.3857 +  /*                                                                       */
  1.3858 +  /* <Description>                                                         */
  1.3859 +  /*    Parse all bytecode instructions of a TrueType font file to check   */
  1.3860 +  /*    whether any of the patented opcodes are used.  This is only useful */
  1.3861 +  /*    if you want to be able to use the unpatented hinter with           */
  1.3862 +  /*    fonts that do *not* use these opcodes.                             */
  1.3863 +  /*                                                                       */
  1.3864 +  /*    Note that this function parses *all* glyph instructions in the     */
  1.3865 +  /*    font file, which may be slow.                                      */
  1.3866 +  /*                                                                       */
  1.3867 +  /* <Input>                                                               */
  1.3868 +  /*    face :: A face handle.                                             */
  1.3869 +  /*                                                                       */
  1.3870 +  /* <Return>                                                              */
  1.3871 +  /*    1~if this is a TrueType font that uses one of the patented         */
  1.3872 +  /*    opcodes, 0~otherwise.                                              */
  1.3873 +  /*                                                                       */
  1.3874 +  /* <Note>                                                                */
  1.3875 +  /*    Since May 2010, TrueType hinting is no longer patented.            */
  1.3876 +  /*                                                                       */
  1.3877 +  /* <Since>                                                               */
  1.3878 +  /*    2.3.5                                                              */
  1.3879 +  /*                                                                       */
  1.3880 +  FT_EXPORT( FT_Bool )
  1.3881 +  FT_Face_CheckTrueTypePatents( FT_Face  face );
  1.3882 +
  1.3883 +
  1.3884 +  /*************************************************************************/
  1.3885 +  /*                                                                       */
  1.3886 +  /* <Function>                                                            */
  1.3887 +  /*    FT_Face_SetUnpatentedHinting                                       */
  1.3888 +  /*                                                                       */
  1.3889 +  /* <Description>                                                         */
  1.3890 +  /*    Enable or disable the unpatented hinter for a given face.          */
  1.3891 +  /*    Only enable it if you have determined that the face doesn't        */
  1.3892 +  /*    use any patented opcodes (see @FT_Face_CheckTrueTypePatents).      */
  1.3893 +  /*                                                                       */
  1.3894 +  /* <Input>                                                               */
  1.3895 +  /*    face  :: A face handle.                                            */
  1.3896 +  /*                                                                       */
  1.3897 +  /*    value :: New boolean setting.                                      */
  1.3898 +  /*                                                                       */
  1.3899 +  /* <Return>                                                              */
  1.3900 +  /*    The old setting value.  This will always be false if this is not   */
  1.3901 +  /*    an SFNT font, or if the unpatented hinter is not compiled in this  */
  1.3902 +  /*    instance of the library.                                           */
  1.3903 +  /*                                                                       */
  1.3904 +  /* <Note>                                                                */
  1.3905 +  /*    Since May 2010, TrueType hinting is no longer patented.            */
  1.3906 +  /*                                                                       */
  1.3907 +  /* <Since>                                                               */
  1.3908 +  /*    2.3.5                                                              */
  1.3909 +  /*                                                                       */
  1.3910 +  FT_EXPORT( FT_Bool )
  1.3911 +  FT_Face_SetUnpatentedHinting( FT_Face  face,
  1.3912 +                                FT_Bool  value );
  1.3913 +
  1.3914 +  /* */
  1.3915 +
  1.3916 +
  1.3917 +FT_END_HEADER
  1.3918 +
  1.3919 +#endif /* __FREETYPE_H__ */
  1.3920 +
  1.3921 +
  1.3922 +/* END */