Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygent1parse.h
Go to the documentation of this file.
00001 /***************************************************************************/ 00002 /* */ 00003 /* t1parse.h */ 00004 /* */ 00005 /* Type 1 parser (specification). */ 00006 /* */ 00007 /* Copyright 1996-2001, 2002, 2003, 2008 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 __T1PARSE_H__ 00020 #define __T1PARSE_H__ 00021 00022 00023 #include <ft2build.h> 00024 #include FT_INTERNAL_TYPE1_TYPES_H 00025 #include FT_INTERNAL_STREAM_H 00026 00027 00028 FT_BEGIN_HEADER 00029 00030 00031 /*************************************************************************/ 00032 /* */ 00033 /* <Struct> */ 00034 /* T1_ParserRec */ 00035 /* */ 00036 /* <Description> */ 00037 /* A PS_ParserRec is an object used to parse a Type 1 fonts very */ 00038 /* quickly. */ 00039 /* */ 00040 /* <Fields> */ 00041 /* root :: The root parser. */ 00042 /* */ 00043 /* stream :: The current input stream. */ 00044 /* */ 00045 /* base_dict :: A pointer to the top-level dictionary. */ 00046 /* */ 00047 /* base_len :: The length in bytes of the top dictionary. */ 00048 /* */ 00049 /* private_dict :: A pointer to the private dictionary. */ 00050 /* */ 00051 /* private_len :: The length in bytes of the private dictionary. */ 00052 /* */ 00053 /* in_pfb :: A boolean. Indicates that we are handling a PFB */ 00054 /* file. */ 00055 /* */ 00056 /* in_memory :: A boolean. Indicates a memory-based stream. */ 00057 /* */ 00058 /* single_block :: A boolean. Indicates that the private dictionary */ 00059 /* is stored in lieu of the base dictionary. */ 00060 /* */ 00061 typedef struct T1_ParserRec_ 00062 { 00063 PS_ParserRec root; 00064 FT_Stream stream; 00065 00066 FT_Byte* base_dict; 00067 FT_ULong base_len; 00068 00069 FT_Byte* private_dict; 00070 FT_ULong private_len; 00071 00072 FT_Bool in_pfb; 00073 FT_Bool in_memory; 00074 FT_Bool single_block; 00075 00076 } T1_ParserRec, *T1_Parser; 00077 00078 00079 #define T1_Add_Table( p, i, o, l ) (p)->funcs.add( (p), i, o, l ) 00080 #define T1_Done_Table( p ) \ 00081 do \ 00082 { \ 00083 if ( (p)->funcs.done ) \ 00084 (p)->funcs.done( p ); \ 00085 } while ( 0 ) 00086 #define T1_Release_Table( p ) \ 00087 do \ 00088 { \ 00089 if ( (p)->funcs.release ) \ 00090 (p)->funcs.release( p ); \ 00091 } while ( 0 ) 00092 00093 00094 #define T1_Skip_Spaces( p ) (p)->root.funcs.skip_spaces( &(p)->root ) 00095 #define T1_Skip_PS_Token( p ) (p)->root.funcs.skip_PS_token( &(p)->root ) 00096 00097 #define T1_ToInt( p ) (p)->root.funcs.to_int( &(p)->root ) 00098 #define T1_ToFixed( p, t ) (p)->root.funcs.to_fixed( &(p)->root, t ) 00099 00100 #define T1_ToCoordArray( p, m, c ) \ 00101 (p)->root.funcs.to_coord_array( &(p)->root, m, c ) 00102 #define T1_ToFixedArray( p, m, f, t ) \ 00103 (p)->root.funcs.to_fixed_array( &(p)->root, m, f, t ) 00104 #define T1_ToToken( p, t ) \ 00105 (p)->root.funcs.to_token( &(p)->root, t ) 00106 #define T1_ToTokenArray( p, t, m, c ) \ 00107 (p)->root.funcs.to_token_array( &(p)->root, t, m, c ) 00108 00109 #define T1_Load_Field( p, f, o, m, pf ) \ 00110 (p)->root.funcs.load_field( &(p)->root, f, o, m, pf ) 00111 00112 #define T1_Load_Field_Table( p, f, o, m, pf ) \ 00113 (p)->root.funcs.load_field_table( &(p)->root, f, o, m, pf ) 00114 00115 00116 FT_LOCAL( FT_Error ) 00117 T1_New_Parser( T1_Parser parser, 00118 FT_Stream stream, 00119 FT_Memory memory, 00120 PSAux_Service psaux ); 00121 00122 FT_LOCAL( FT_Error ) 00123 T1_Get_Private_Dict( T1_Parser parser, 00124 PSAux_Service psaux ); 00125 00126 FT_LOCAL( void ) 00127 T1_Finalize_Parser( T1_Parser parser ); 00128 00129 00130 FT_END_HEADER 00131 00132 #endif /* __T1PARSE_H__ */ 00133 00134 00135 /* END */ Generated on Sat May 26 2012 04:32:59 for ReactOS by
1.7.6.1
|