1 /***************************************************************************/ 2 /* */ 3 /* t1parse.h */ 4 /* */ 5 /* Type 1 parser (specification). */ 6 /* */ 7 /* Copyright 1996-2018 by */ 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 /* */ 10 /* This file is part of the FreeType project, and may only be used, */ 11 /* modified, and distributed under the terms of the FreeType project */ 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 13 /* this file you indicate that you have read the license and */ 14 /* understand and accept it fully. */ 15 /* */ 16 /***************************************************************************/ 17 18 19 #ifndef T1PARSE_H_ 20 #define T1PARSE_H_ 21 22 23 #include <ft2build.h> 24 #include FT_INTERNAL_TYPE1_TYPES_H 25 #include FT_INTERNAL_STREAM_H 26 27 28 FT_BEGIN_HEADER 29 30 31 /*************************************************************************/ 32 /* */ 33 /* <Struct> */ 34 /* T1_ParserRec */ 35 /* */ 36 /* <Description> */ 37 /* A PS_ParserRec is an object used to parse a Type 1 fonts very */ 38 /* quickly. */ 39 /* */ 40 /* <Fields> */ 41 /* root :: The root parser. */ 42 /* */ 43 /* stream :: The current input stream. */ 44 /* */ 45 /* base_dict :: A pointer to the top-level dictionary. */ 46 /* */ 47 /* base_len :: The length in bytes of the top dictionary. */ 48 /* */ 49 /* private_dict :: A pointer to the private dictionary. */ 50 /* */ 51 /* private_len :: The length in bytes of the private dictionary. */ 52 /* */ 53 /* in_pfb :: A boolean. Indicates that we are handling a PFB */ 54 /* file. */ 55 /* */ 56 /* in_memory :: A boolean. Indicates a memory-based stream. */ 57 /* */ 58 /* single_block :: A boolean. Indicates that the private dictionary */ 59 /* is stored in lieu of the base dictionary. */ 60 /* */ 61 typedef struct T1_ParserRec_ 62 { 63 PS_ParserRec root; 64 FT_Stream stream; 65 66 FT_Byte* base_dict; 67 FT_ULong base_len; 68 69 FT_Byte* private_dict; 70 FT_ULong private_len; 71 72 FT_Bool in_pfb; 73 FT_Bool in_memory; 74 FT_Bool single_block; 75 76 } T1_ParserRec, *T1_Parser; 77 78 79 #define T1_Add_Table( p, i, o, l ) (p)->funcs.add( (p), i, o, l ) 80 #define T1_Release_Table( p ) \ | 1 /**************************************************************************** 2 * 3 * t1parse.h 4 * 5 * Type 1 parser (specification). 6 * 7 * Copyright (C) 1996-2019 by 8 * David Turner, Robert Wilhelm, and Werner Lemberg. 9 * 10 * This file is part of the FreeType project, and may only be used, 11 * modified, and distributed under the terms of the FreeType project 12 * license, LICENSE.TXT. By continuing to use, modify, or distribute 13 * this file you indicate that you have read the license and 14 * understand and accept it fully. 15 * 16 */ 17 18 19 #ifndef T1PARSE_H_ 20 #define T1PARSE_H_ 21 22 23 #include <ft2build.h> 24 #include FT_INTERNAL_TYPE1_TYPES_H 25 #include FT_INTERNAL_STREAM_H 26 27 28 FT_BEGIN_HEADER 29 30 31 /************************************************************************** 32 * 33 * @Struct: 34 * T1_ParserRec 35 * 36 * @Description: 37 * A PS_ParserRec is an object used to parse a Type 1 fonts very 38 * quickly. 39 * 40 * @Fields: 41 * root :: 42 * The root parser. 43 * 44 * stream :: 45 * The current input stream. 46 * 47 * base_dict :: 48 * A pointer to the top-level dictionary. 49 * 50 * base_len :: 51 * The length in bytes of the top dictionary. 52 * 53 * private_dict :: 54 * A pointer to the private dictionary. 55 * 56 * private_len :: 57 * The length in bytes of the private dictionary. 58 * 59 * in_pfb :: 60 * A boolean. Indicates that we are handling a PFB 61 * file. 62 * 63 * in_memory :: 64 * A boolean. Indicates a memory-based stream. 65 * 66 * single_block :: 67 * A boolean. Indicates that the private dictionary 68 * is stored in lieu of the base dictionary. 69 */ 70 typedef struct T1_ParserRec_ 71 { 72 PS_ParserRec root; 73 FT_Stream stream; 74 75 FT_Byte* base_dict; 76 FT_ULong base_len; 77 78 FT_Byte* private_dict; 79 FT_ULong private_len; 80 81 FT_Bool in_pfb; 82 FT_Bool in_memory; 83 FT_Bool single_block; 84 85 } T1_ParserRec, *T1_Parser; 86 87 88 #define T1_Add_Table( p, i, o, l ) (p)->funcs.add( (p), i, o, l ) 89 #define T1_Release_Table( p ) \ |