ttgxvar.h

Go to the documentation of this file.
00001 /***************************************************************************/
00002 /*                                                                         */
00003 /*  ttgxvar.h                                                              */
00004 /*                                                                         */
00005 /*    TrueType GX Font Variation loader (specification)                    */
00006 /*                                                                         */
00007 /*  Copyright 2004 by                                                      */
00008 /*  David Turner, Robert Wilhelm, Werner Lemberg and George Williams.      */
00009 /*                                                                         */
00010 /*  This file is part of the FreeType project, and may only be used,       */
00011 /*  modified, and distributed under the terms of the FreeType project      */
00012 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
00013 /*  this file you indicate that you have read the license and              */
00014 /*  understand and accept it fully.                                        */
00015 /*                                                                         */
00016 /***************************************************************************/
00017 
00018 
00019 #ifndef __TTGXVAR_H__
00020 #define __TTGXVAR_H__
00021 
00022 
00023 #include <ft2build.h>
00024 #include "ttobjs.h"
00025 
00026 
00027 FT_BEGIN_HEADER
00028 
00029 
00030   /*************************************************************************/
00031   /*                                                                       */
00032   /* <Struct>                                                              */
00033   /*    GX_AVarCorrespondenceRec                                           */
00034   /*                                                                       */
00035   /* <Description>                                                         */
00036   /*    A data structure representing `shortFracCorrespondence' in `avar'  */
00037   /*    table according to the specifications from Apple.                  */
00038   /*                                                                       */
00039   typedef struct  GX_AVarCorrespondenceRec_
00040   {
00041     FT_Fixed  fromCoord;
00042     FT_Fixed  toCoord;
00043 
00044   } GX_AVarCorrespondenceRec_, *GX_AVarCorrespondence;
00045 
00046 
00047   /*************************************************************************/
00048   /*                                                                       */
00049   /* <Struct>                                                              */
00050   /*    GX_AVarRec                                                         */
00051   /*                                                                       */
00052   /* <Description>                                                         */
00053   /*    Data from the segment field of `avar' table.                       */
00054   /*    There is one of these for each axis.                               */
00055   /*                                                                       */
00056   typedef struct  GX_AVarSegmentRec_
00057   {
00058     FT_UShort              pairCount;
00059     GX_AVarCorrespondence  correspondence; /* array with pairCount entries */
00060 
00061   } GX_AVarSegmentRec, *GX_AVarSegment;
00062 
00063 
00064   /*************************************************************************/
00065   /*                                                                       */
00066   /* <Struct>                                                              */
00067   /*    GX_BlendRec                                                        */
00068   /*                                                                       */
00069   /* <Description>                                                         */
00070   /*    Data for interpolating a font from a distortable font specified    */
00071   /*    by the GX *var tables ([fgca]var).                                 */
00072   /*                                                                       */
00073   /* <Fields>                                                              */
00074   /*    num_axis         :: The number of axes along which interpolation   */
00075   /*                         may happen                                    */
00076   /*                                                                       */
00077   /*    normalizedcoords :: A normalized value (between [-1,1]) indicating */
00078   /*                        the contribution along each axis to the final  */
00079   /*                        interpolated font.                             */
00080   /*                                                                       */
00081   typedef struct  GX_BlendRec_
00082   {
00083     FT_UInt         num_axis;
00084     FT_Fixed*       normalizedcoords;
00085 
00086     FT_MM_Var*      mmvar;
00087     FT_Offset       mmvar_len;
00088 
00089     FT_Bool         avar_checked;
00090     GX_AVarSegment  avar_segment;
00091 
00092     FT_UInt         tuplecount;      /* shared tuples in `gvar'           */
00093     FT_Fixed*       tuplecoords;     /* tuplecoords[tuplecount][num_axis] */
00094 
00095     FT_UInt         gv_glyphcnt;
00096     FT_ULong*       glyphoffsets;
00097 
00098   } GX_BlendRec;
00099 
00100 
00101   /*************************************************************************/
00102   /*                                                                       */
00103   /* <enum>                                                                */
00104   /*    GX_TupleCountFlags                                                 */
00105   /*                                                                       */
00106   /* <Description>                                                         */
00107   /*    Flags used within the `TupleCount' field of the `gvar' table.      */
00108   /*                                                                       */
00109   typedef enum  GX_TupleCountFlags_
00110   {
00111     GX_TC_TUPLES_SHARE_POINT_NUMBERS = 0x8000,
00112     GX_TC_RESERVED_TUPLE_FLAGS       = 0x7000,
00113     GX_TC_TUPLE_COUNT_MASK           = 0x0FFF
00114 
00115   } GX_TupleCountFlags;
00116 
00117 
00118   /*************************************************************************/
00119   /*                                                                       */
00120   /* <enum>                                                                */
00121   /*    GX_TupleIndexFlags                                                 */
00122   /*                                                                       */
00123   /* <Description>                                                         */
00124   /*    Flags used within the `TupleIndex' field of the `gvar' and `cvar'  */
00125   /*    tables.                                                            */
00126   /*                                                                       */
00127   typedef enum  GX_TupleIndexFlags_
00128   {
00129     GX_TI_EMBEDDED_TUPLE_COORD  = 0x8000,
00130     GX_TI_INTERMEDIATE_TUPLE    = 0x4000,
00131     GX_TI_PRIVATE_POINT_NUMBERS = 0x2000,
00132     GX_TI_RESERVED_TUPLE_FLAG   = 0x1000,
00133     GX_TI_TUPLE_INDEX_MASK      = 0x0FFF
00134 
00135   } GX_TupleIndexFlags;
00136 
00137 
00138 #define TTAG_wght  FT_MAKE_TAG( 'w', 'g', 'h', 't' )
00139 #define TTAG_wdth  FT_MAKE_TAG( 'w', 'd', 't', 'h' )
00140 #define TTAG_opsz  FT_MAKE_TAG( 'o', 'p', 's', 'z' )
00141 #define TTAG_slnt  FT_MAKE_TAG( 's', 'l', 'n', 't' )
00142 
00143 
00144   FT_LOCAL( FT_Error )
00145   TT_Set_MM_Blend( TT_Face    face,
00146                    FT_UInt    num_coords,
00147                    FT_Fixed*  coords );
00148 
00149   FT_LOCAL( FT_Error )
00150   TT_Set_Var_Design( TT_Face    face,
00151                      FT_UInt    num_coords,
00152                      FT_Fixed*  coords );
00153 
00154   FT_LOCAL( FT_Error )
00155   TT_Get_MM_Var( TT_Face      face,
00156                  FT_MM_Var*  *master );
00157 
00158 
00159   FT_LOCAL( FT_Error )
00160   tt_face_vary_cvt( TT_Face    face,
00161                     FT_Stream  stream );
00162 
00163 
00164   FT_LOCAL( FT_Error )
00165   TT_Vary_Get_Glyph_Deltas( TT_Face      face,
00166                             FT_UInt      glyph_index,
00167                             FT_Vector*  *deltas,
00168                             FT_UInt      n_points );
00169 
00170 
00171   FT_LOCAL( void )
00172   tt_done_blend( FT_Memory  memory,
00173                  GX_Blend   blend );
00174 
00175 
00176 FT_END_HEADER
00177 
00178 
00179 #endif /* __TTGXVAR_H__ */
00180 
00181 
00182 /* END */

Generated on Tue Jul 5 14:13:53 2011 for ROOT_528-00b_version by  doxygen 1.5.1