afmparse.h

Go to the documentation of this file.
00001 /***************************************************************************/
00002 /*                                                                         */
00003 /*  afmparse.h                                                             */
00004 /*                                                                         */
00005 /*    AFM parser (specification).                                          */
00006 /*                                                                         */
00007 /*  Copyright 2006 by                                                      */
00008 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
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 __AFMPARSE_H__
00020 #define __AFMPARSE_H__
00021 
00022 
00023 #include <ft2build.h>
00024 #include FT_INTERNAL_POSTSCRIPT_AUX_H
00025 
00026 
00027 FT_BEGIN_HEADER
00028 
00029 
00030   FT_LOCAL( FT_Error )
00031   afm_parser_init( AFM_Parser  parser,
00032                    FT_Memory   memory,
00033                    FT_Byte*    base,
00034                    FT_Byte*    limit );
00035 
00036 
00037   FT_LOCAL( void )
00038   afm_parser_done( AFM_Parser  parser );
00039 
00040 
00041   FT_LOCAL( FT_Error )
00042   afm_parser_parse( AFM_Parser  parser );
00043 
00044 
00045   enum  AFM_ValueType_
00046   {
00047     AFM_VALUE_TYPE_STRING,
00048     AFM_VALUE_TYPE_NAME,
00049     AFM_VALUE_TYPE_FIXED,   /* real number */
00050     AFM_VALUE_TYPE_INTEGER,
00051     AFM_VALUE_TYPE_BOOL,
00052     AFM_VALUE_TYPE_INDEX    /* glyph index */
00053   };
00054 
00055 
00056   typedef struct  AFM_ValueRec_
00057   {
00058     enum AFM_ValueType_  type;
00059     union {
00060       char*     s;
00061       FT_Fixed  f;
00062       FT_Int    i;
00063       FT_Bool   b;
00064 
00065     } u;
00066 
00067   } AFM_ValueRec, *AFM_Value;
00068 
00069 #define  AFM_MAX_ARGUMENTS  5
00070 
00071   FT_LOCAL( FT_Int )
00072   afm_parser_read_vals( AFM_Parser  parser,
00073                         AFM_Value   vals,
00074                         FT_UInt     n );
00075 
00076   /* read the next key from the next line or column */
00077   FT_LOCAL( char* )
00078   afm_parser_next_key( AFM_Parser  parser,
00079                        FT_Bool     line,
00080                        FT_Offset*  len );
00081 
00082 FT_END_HEADER
00083 
00084 #endif /* __AFMPARSE_H__ */
00085 
00086 
00087 /* END */

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