2000-06-16 08:49:56 +02:00
|
|
|
/***************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* cidparse.h */
|
|
|
|
/* */
|
|
|
|
/* CID-keyed Type1 parser (specification). */
|
|
|
|
/* */
|
|
|
|
/* Copyright 1996-2000 by */
|
|
|
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
|
|
|
/* */
|
|
|
|
/* This file is part of the FreeType project, and may only be used, */
|
|
|
|
/* modified, and distributed under the terms of the FreeType project */
|
|
|
|
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
|
|
|
|
/* this file you indicate that you have read the license and */
|
|
|
|
/* understand and accept it fully. */
|
|
|
|
/* */
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2000-06-01 05:27:48 +02:00
|
|
|
|
|
|
|
#ifndef CIDPARSE_H
|
|
|
|
#define CIDPARSE_H
|
|
|
|
|
|
|
|
#include <freetype/internal/t1types.h>
|
2000-07-31 20:59:02 +02:00
|
|
|
#include <freetype/internal/ftstream.h>
|
2000-08-24 00:47:44 +02:00
|
|
|
#include <freetype/internal/psaux.h>
|
2000-06-16 08:49:56 +02:00
|
|
|
|
2000-06-01 05:27:48 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2000-06-16 08:49:56 +02:00
|
|
|
|
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* <Struct> */
|
|
|
|
/* CID_Parser */
|
|
|
|
/* */
|
|
|
|
/* <Description> */
|
|
|
|
/* A CID_Parser is an object used to parse a Type 1 fonts very */
|
|
|
|
/* quickly. */
|
|
|
|
/* */
|
|
|
|
/* <Fields> */
|
2000-08-24 00:47:44 +02:00
|
|
|
/* root :: the root T1_Parser fields */
|
2000-06-16 08:49:56 +02:00
|
|
|
/* */
|
2000-08-24 00:47:44 +02:00
|
|
|
/* stream :: The current input stream. */
|
2000-06-16 08:49:56 +02:00
|
|
|
/* */
|
|
|
|
/* postscript :: A pointer to the data to be parsed. */
|
|
|
|
/* */
|
|
|
|
/* postscript_len :: The length of the data to be parsed. */
|
|
|
|
/* */
|
|
|
|
/* data_offset :: The start position of the binary data (i.e., the */
|
|
|
|
/* end of the data to be parsed. */
|
|
|
|
/* */
|
|
|
|
/* cid :: A structure which holds the information about */
|
|
|
|
/* the current font. */
|
|
|
|
/* */
|
|
|
|
/* num_dict :: The number of font dictionaries. */
|
|
|
|
/* */
|
2000-06-01 05:27:48 +02:00
|
|
|
typedef struct CID_Parser_
|
|
|
|
{
|
2000-08-24 00:47:44 +02:00
|
|
|
T1_Parser root;
|
2000-06-01 05:27:48 +02:00
|
|
|
FT_Stream stream;
|
|
|
|
|
2000-06-16 21:34:52 +02:00
|
|
|
FT_Byte* postscript;
|
|
|
|
FT_Int postscript_len;
|
2000-06-01 05:27:48 +02:00
|
|
|
|
2000-06-16 21:34:52 +02:00
|
|
|
FT_ULong data_offset;
|
2000-06-01 05:27:48 +02:00
|
|
|
|
|
|
|
CID_Info* cid;
|
2000-06-16 21:34:52 +02:00
|
|
|
FT_Int num_dict;
|
2000-06-01 05:27:48 +02:00
|
|
|
|
|
|
|
} CID_Parser;
|
|
|
|
|
|
|
|
|
|
|
|
LOCAL_DEF
|
2000-08-24 00:47:44 +02:00
|
|
|
FT_Error CID_New_Parser( CID_Parser* parser,
|
|
|
|
FT_Stream stream,
|
|
|
|
FT_Memory memory,
|
|
|
|
PSAux_Interface* psaux );
|
2000-06-01 05:27:48 +02:00
|
|
|
|
|
|
|
LOCAL_DEF
|
|
|
|
void CID_Done_Parser( CID_Parser* parser );
|
|
|
|
|
|
|
|
|
2000-06-16 08:49:56 +02:00
|
|
|
/*************************************************************************/
|
|
|
|
/* */
|
|
|
|
/* PARSING ROUTINES */
|
|
|
|
/* */
|
|
|
|
/*************************************************************************/
|
2000-06-01 05:27:48 +02:00
|
|
|
|
2000-08-24 00:47:44 +02:00
|
|
|
#define CID_Skip_Spaces(p) (p)->root.funcs.skip_spaces( &(p)->root )
|
|
|
|
#define CID_Skip_Alpha(p) (p)->root.funcs.skip_alpha ( &(p)->root )
|
2000-06-01 05:27:48 +02:00
|
|
|
|
2000-08-24 00:47:44 +02:00
|
|
|
#define CID_ToInt(p) (p)->root.funcs.to_int( &(p)->root )
|
|
|
|
#define CID_ToFixed(p,t) (p)->root.funcs.to_fixed( &(p)->root, t )
|
2000-06-01 05:27:48 +02:00
|
|
|
|
2000-08-24 00:47:44 +02:00
|
|
|
#define CID_ToCoordArray(p,m,c) (p)->root.funcs.to_coord_array( &(p)->root, m, c )
|
|
|
|
#define CID_ToFixedArray(p,m,f,t) (p)->root.funcs.to_fixed_array( &(p)->root, m, f, t )
|
|
|
|
#define CID_ToToken(p,t) (p)->root.funcs.to_token( &(p)->root, t )
|
|
|
|
#define CID_ToTokenArray(p,t,m,c) (p)->root.funcs.to_token_array( &(p)->root, t, m, c )
|
2000-06-01 05:27:48 +02:00
|
|
|
|
2000-08-24 00:47:44 +02:00
|
|
|
#define CID_Load_Field(p,f,o) (p)->root.funcs.load_field( &(p)->root, f, o, 0, 0 )
|
|
|
|
#define CID_Load_Field_Table(p,f,o) (p)->root.funcs.load_field_table( &(p)->root, f, o, 0, 0 )
|
2000-06-01 05:27:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2000-06-16 08:49:56 +02:00
|
|
|
|
2000-06-01 05:27:48 +02:00
|
|
|
#endif /* CIDPARSE_H */
|
|
|
|
|
|
|
|
|
|
|
|
/* END */
|