ReactOS 0.4.16-dev-2332-g4cba65d
psaux.h
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * psaux.h
4 *
5 * Auxiliary functions and data structures related to PostScript fonts
6 * (specification).
7 *
8 * Copyright (C) 1996-2020 by
9 * David Turner, Robert Wilhelm, and Werner Lemberg.
10 *
11 * This file is part of the FreeType project, and may only be used,
12 * modified, and distributed under the terms of the FreeType project
13 * license, LICENSE.TXT. By continuing to use, modify, or distribute
14 * this file you indicate that you have read the license and
15 * understand and accept it fully.
16 *
17 */
18
19
20#ifndef PSAUX_H_
21#define PSAUX_H_
22
23
31
32
33
35
36
37 /**************************************************************************
38 *
39 * PostScript modules driver class.
40 */
41 typedef struct PS_DriverRec_
42 {
44
48 FT_Int32 random_seed;
49
51
52
53 /*************************************************************************/
54 /*************************************************************************/
55 /***** *****/
56 /***** T1_TABLE *****/
57 /***** *****/
58 /*************************************************************************/
59 /*************************************************************************/
60
61
62 typedef struct PS_TableRec_* PS_Table;
63 typedef const struct PS_Table_FuncsRec_* PS_Table_Funcs;
64
65
66 /**************************************************************************
67 *
68 * @struct:
69 * PS_Table_FuncsRec
70 *
71 * @description:
72 * A set of function pointers to manage PS_Table objects.
73 *
74 * @fields:
75 * table_init ::
76 * Used to initialize a table.
77 *
78 * table_done ::
79 * Finalizes resp. destroy a given table.
80 *
81 * table_add ::
82 * Adds a new object to a table.
83 *
84 * table_release ::
85 * Releases table data, then finalizes it.
86 */
87 typedef struct PS_Table_FuncsRec_
88 {
93
95 (*done)( PS_Table table );
96
98 (*add)( PS_Table table,
99 FT_Int idx,
100 const void* object,
101 FT_UInt length );
102
104 (*release)( PS_Table table );
105
107
108
109 /**************************************************************************
110 *
111 * @struct:
112 * PS_TableRec
113 *
114 * @description:
115 * A PS_Table is a simple object used to store an array of objects in a
116 * single memory block.
117 *
118 * @fields:
119 * block ::
120 * The address in memory of the growheap's block. This can change
121 * between two object adds, due to reallocation.
122 *
123 * cursor ::
124 * The current top of the grow heap within its block.
125 *
126 * capacity ::
127 * The current size of the heap block. Increments by 1kByte chunks.
128 *
129 * init ::
130 * Set to 0xDEADBEEF if 'elements' and 'lengths' have been allocated.
131 *
132 * max_elems ::
133 * The maximum number of elements in table.
134 *
135 * num_elems ::
136 * The current number of elements in table.
137 *
138 * elements ::
139 * A table of element addresses within the block.
140 *
141 * lengths ::
142 * A table of element sizes within the block.
143 *
144 * memory ::
145 * The object used for memory operations (alloc/realloc).
146 *
147 * funcs ::
148 * A table of method pointers for this object.
149 */
150 typedef struct PS_TableRec_
151 {
152 FT_Byte* block; /* current memory block */
153 FT_Offset cursor; /* current cursor in memory block */
154 FT_Offset capacity; /* current size of memory block */
156
159 FT_Byte** elements; /* addresses of table elements */
160 FT_UInt* lengths; /* lengths of table elements */
161
164
166
167
168 /*************************************************************************/
169 /*************************************************************************/
170 /***** *****/
171 /***** T1 FIELDS & TOKENS *****/
172 /***** *****/
173 /*************************************************************************/
174 /*************************************************************************/
175
176 typedef struct PS_ParserRec_* PS_Parser;
177
178 typedef struct T1_TokenRec_* T1_Token;
179
180 typedef struct T1_FieldRec_* T1_Field;
181
182
183 /* simple enumeration type used to identify token types */
184 typedef enum T1_TokenType_
185 {
190 T1_TOKEN_TYPE_KEY, /* aka `name' */
191
192 /* do not remove */
194
196
197
198 /* a simple structure used to identify tokens */
199 typedef struct T1_TokenRec_
200 {
201 FT_Byte* start; /* first character of token in input stream */
202 FT_Byte* limit; /* first character after the token */
203 T1_TokenType type; /* type of token */
204
206
207
208 /* enumeration type used to identify object fields */
209 typedef enum T1_FieldType_
210 {
223
224 /* do not remove */
226
228
229
230 typedef enum T1_FieldLocation_
231 {
241
242 /* do not remove */
244
246
247
248 typedef void
251
252
253 /* structure type used to model object fields */
254 typedef struct T1_FieldRec_
255 {
256 const char* ident; /* field identifier */
258 T1_FieldType type; /* type of field */
260 FT_UInt offset; /* offset of field in object */
261 FT_Byte size; /* size of field in bytes */
262 FT_UInt array_max; /* maximum number of elements for */
263 /* array */
264 FT_UInt count_offset; /* offset of element count for */
265 /* arrays; must not be zero if in */
266 /* use -- in other words, a */
267 /* `num_FOO' element must not */
268 /* start the used structure if we */
269 /* parse a `FOO' array */
270 FT_UInt dict; /* where we expect it */
272
273#define T1_FIELD_DICT_FONTDICT ( 1 << 0 ) /* also FontInfo and FDArray */
274#define T1_FIELD_DICT_PRIVATE ( 1 << 1 )
275
276
277
278#define T1_NEW_SIMPLE_FIELD( _ident, _type, _fname, _dict ) \
279 { \
280 _ident, T1CODE, _type, \
281 0, \
282 FT_FIELD_OFFSET( _fname ), \
283 FT_FIELD_SIZE( _fname ), \
284 0, 0, \
285 _dict \
286 },
287
288#define T1_NEW_CALLBACK_FIELD( _ident, _reader, _dict ) \
289 { \
290 _ident, T1CODE, T1_FIELD_TYPE_CALLBACK, \
291 (T1_Field_ParseFunc)_reader, \
292 0, 0, \
293 0, 0, \
294 _dict \
295 },
296
297#define T1_NEW_TABLE_FIELD( _ident, _type, _fname, _max, _dict ) \
298 { \
299 _ident, T1CODE, _type, \
300 0, \
301 FT_FIELD_OFFSET( _fname ), \
302 FT_FIELD_SIZE_DELTA( _fname ), \
303 _max, \
304 FT_FIELD_OFFSET( num_ ## _fname ), \
305 _dict \
306 },
307
308#define T1_NEW_TABLE_FIELD2( _ident, _type, _fname, _max, _dict ) \
309 { \
310 _ident, T1CODE, _type, \
311 0, \
312 FT_FIELD_OFFSET( _fname ), \
313 FT_FIELD_SIZE_DELTA( _fname ), \
314 _max, 0, \
315 _dict \
316 },
317
318
319#define T1_FIELD_BOOL( _ident, _fname, _dict ) \
320 T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BOOL, _fname, _dict )
321
322#define T1_FIELD_NUM( _ident, _fname, _dict ) \
323 T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER, _fname, _dict )
324
325#define T1_FIELD_FIXED( _ident, _fname, _dict ) \
326 T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED, _fname, _dict )
327
328#define T1_FIELD_FIXED_1000( _ident, _fname, _dict ) \
329 T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_1000, _fname, \
330 _dict )
331
332#define T1_FIELD_STRING( _ident, _fname, _dict ) \
333 T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_STRING, _fname, _dict )
334
335#define T1_FIELD_KEY( _ident, _fname, _dict ) \
336 T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_KEY, _fname, _dict )
337
338#define T1_FIELD_BBOX( _ident, _fname, _dict ) \
339 T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BBOX, _fname, _dict )
340
341
342#define T1_FIELD_NUM_TABLE( _ident, _fname, _fmax, _dict ) \
343 T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \
344 _fname, _fmax, _dict )
345
346#define T1_FIELD_FIXED_TABLE( _ident, _fname, _fmax, _dict ) \
347 T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \
348 _fname, _fmax, _dict )
349
350#define T1_FIELD_NUM_TABLE2( _ident, _fname, _fmax, _dict ) \
351 T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \
352 _fname, _fmax, _dict )
353
354#define T1_FIELD_FIXED_TABLE2( _ident, _fname, _fmax, _dict ) \
355 T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \
356 _fname, _fmax, _dict )
357
358#define T1_FIELD_CALLBACK( _ident, _name, _dict ) \
359 T1_NEW_CALLBACK_FIELD( _ident, _name, _dict )
360
361
362 /*************************************************************************/
363 /*************************************************************************/
364 /***** *****/
365 /***** T1 PARSER *****/
366 /***** *****/
367 /*************************************************************************/
368 /*************************************************************************/
369
371
372 typedef struct PS_Parser_FuncsRec_
373 {
376 FT_Byte* base,
377 FT_Byte* limit,
379
381 (*done)( PS_Parser parser );
382
387
389 (*to_int)( PS_Parser parser );
392 FT_Int power_ten );
393
396 FT_Byte* bytes,
397 FT_Offset max_bytes,
398 FT_ULong* pnum_bytes,
399 FT_Bool delimiters );
400
403 FT_Int max_coords,
404 FT_Short* coords );
407 FT_Int max_values,
409 FT_Int power_ten );
410
413 T1_Token token );
416 T1_Token tokens,
417 FT_UInt max_tokens,
418 FT_Int* pnum_tokens );
419
422 const T1_Field field,
423 void** objects,
424 FT_UInt max_objects,
425 FT_ULong* pflags );
426
429 const T1_Field field,
430 void** objects,
431 FT_UInt max_objects,
432 FT_ULong* pflags );
433
435
436
437 /**************************************************************************
438 *
439 * @struct:
440 * PS_ParserRec
441 *
442 * @description:
443 * A PS_Parser is an object used to parse a Type 1 font very quickly.
444 *
445 * @fields:
446 * cursor ::
447 * The current position in the text.
448 *
449 * base ::
450 * Start of the processed text.
451 *
452 * limit ::
453 * End of the processed text.
454 *
455 * error ::
456 * The last error returned.
457 *
458 * memory ::
459 * The object used for memory operations (alloc/realloc).
460 *
461 * funcs ::
462 * A table of functions for the parser.
463 */
464 typedef struct PS_ParserRec_
465 {
471
473
475
476
477 /*************************************************************************/
478 /*************************************************************************/
479 /***** *****/
480 /***** PS BUILDER *****/
481 /***** *****/
482 /*************************************************************************/
483 /*************************************************************************/
484
485
486 typedef struct PS_Builder_ PS_Builder;
488
489 typedef struct PS_Builder_FuncsRec_
490 {
492 (*init)( PS_Builder* ps_builder,
493 void* builder,
494 FT_Bool is_t1 );
495
497 (*done)( PS_Builder* builder );
498
500
501
502 /**************************************************************************
503 *
504 * @struct:
505 * PS_Builder
506 *
507 * @description:
508 * A structure used during glyph loading to store its outline.
509 *
510 * @fields:
511 * memory ::
512 * The current memory object.
513 *
514 * face ::
515 * The current face object.
516 *
517 * glyph ::
518 * The current glyph slot.
519 *
520 * loader ::
521 * XXX
522 *
523 * base ::
524 * The base glyph outline.
525 *
526 * current ::
527 * The current glyph outline.
528 *
529 * pos_x ::
530 * The horizontal translation (if composite glyph).
531 *
532 * pos_y ::
533 * The vertical translation (if composite glyph).
534 *
535 * left_bearing ::
536 * The left side bearing point.
537 *
538 * advance ::
539 * The horizontal advance vector.
540 *
541 * bbox ::
542 * Unused.
543 *
544 * path_begun ::
545 * A flag which indicates that a new path has begun.
546 *
547 * load_points ::
548 * If this flag is not set, no points are loaded.
549 *
550 * no_recurse ::
551 * Set but not used.
552 *
553 * metrics_only ::
554 * A boolean indicating that we only want to compute the metrics of a
555 * given glyph, not load all of its points.
556 *
557 * is_t1 ::
558 * Set if current font type is Type 1.
559 *
560 * funcs ::
561 * An array of function pointers for the builder.
562 */
564 {
571
574
577
578 FT_BBox* bbox; /* bounding box */
582
585
587
588 };
589
590
591 /*************************************************************************/
592 /*************************************************************************/
593 /***** *****/
594 /***** PS DECODER *****/
595 /***** *****/
596 /*************************************************************************/
597 /*************************************************************************/
598
599#define PS_MAX_OPERANDS 48
600#define PS_MAX_SUBRS_CALLS 16 /* maximum subroutine nesting; */
601 /* only 10 are allowed but there exist */
602 /* fonts like `HiraKakuProN-W3.ttf' */
603 /* (Hiragino Kaku Gothic ProN W3; */
604 /* 8.2d6e1; 2014-12-19) that exceed */
605 /* this limit */
606
607 /* execution context charstring zone */
608
609 typedef struct PS_Decoder_Zone_
610 {
614
616
617
618 typedef FT_Error
620 FT_UInt glyph_index,
622 FT_ULong* length );
623
624 typedef void
628
629
630 typedef struct PS_Decoder_
631 {
633
636
639
643
645 CFF_SubFont current_subfont; /* for current glyph_index */
647
651
654
657
660
661 FT_Byte** glyph_names; /* for pure CFF fonts only */
662 FT_UInt num_glyphs; /* number of glyphs in font */
663
665
667
670
671 /* Type 1 stuff */
672 FT_Service_PsCMaps psnames; /* for seac */
673
674 FT_Int lenIV; /* internal for sub routine calls */
675 FT_UInt* locals_len; /* array of subrs length (optional) */
676 FT_Hash locals_hash; /* used if `num_subrs' was massaged */
677
680
681 PS_Blend blend; /* for multiple master support */
682
685
687
688
689 /*************************************************************************/
690 /*************************************************************************/
691 /***** *****/
692 /***** T1 BUILDER *****/
693 /***** *****/
694 /*************************************************************************/
695 /*************************************************************************/
696
697
698 typedef struct T1_BuilderRec_* T1_Builder;
699
700
701 typedef FT_Error
703 FT_Int count );
704
705 typedef void
707 FT_Pos x,
708 FT_Pos y,
709 FT_Byte flag );
710
711 typedef FT_Error
713 FT_Pos x,
714 FT_Pos y );
715
716 typedef FT_Error
718
719 typedef FT_Error
721 FT_Pos x,
722 FT_Pos y );
723
724 typedef void
726
727
729
730 typedef struct T1_Builder_FuncsRec_
731 {
733 (*init)( T1_Builder builder,
737 FT_Bool hinting );
738
740 (*done)( T1_Builder builder );
741
748
750
751
752 /* an enumeration type to handle charstring parsing states */
753 typedef enum T1_ParseState_
754 {
759
761
762
763 /**************************************************************************
764 *
765 * @struct:
766 * T1_BuilderRec
767 *
768 * @description:
769 * A structure used during glyph loading to store its outline.
770 *
771 * @fields:
772 * memory ::
773 * The current memory object.
774 *
775 * face ::
776 * The current face object.
777 *
778 * glyph ::
779 * The current glyph slot.
780 *
781 * loader ::
782 * XXX
783 *
784 * base ::
785 * The base glyph outline.
786 *
787 * current ::
788 * The current glyph outline.
789 *
790 * max_points ::
791 * maximum points in builder outline
792 *
793 * max_contours ::
794 * Maximum number of contours in builder outline.
795 *
796 * pos_x ::
797 * The horizontal translation (if composite glyph).
798 *
799 * pos_y ::
800 * The vertical translation (if composite glyph).
801 *
802 * left_bearing ::
803 * The left side bearing point.
804 *
805 * advance ::
806 * The horizontal advance vector.
807 *
808 * bbox ::
809 * Unused.
810 *
811 * parse_state ::
812 * An enumeration which controls the charstring parsing state.
813 *
814 * load_points ::
815 * If this flag is not set, no points are loaded.
816 *
817 * no_recurse ::
818 * Set but not used.
819 *
820 * metrics_only ::
821 * A boolean indicating that we only want to compute the metrics of a
822 * given glyph, not load all of its points.
823 *
824 * funcs ::
825 * An array of function pointers for the builder.
826 */
827 typedef struct T1_BuilderRec_
828 {
835
838
841
842 FT_BBox bbox; /* bounding box */
846
848
849 void* hints_funcs; /* hinter-specific */
850 void* hints_globals; /* hinter-specific */
851
853
855
856
857 /*************************************************************************/
858 /*************************************************************************/
859 /***** *****/
860 /***** T1 DECODER *****/
861 /***** *****/
862 /*************************************************************************/
863 /*************************************************************************/
864
865#if 0
866
867 /**************************************************************************
868 *
869 * T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine
870 * calls during glyph loading.
871 */
872#define T1_MAX_SUBRS_CALLS 8
873
874
875 /**************************************************************************
876 *
877 * T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A
878 * minimum of 16 is required.
879 */
880#define T1_MAX_CHARSTRINGS_OPERANDS 32
881
882#endif /* 0 */
883
884
885 typedef struct T1_Decoder_ZoneRec_
886 {
890
892
893
894 typedef struct T1_DecoderRec_* T1_Decoder;
896
897
898 typedef FT_Error
900 FT_UInt glyph_index );
901
902
903 typedef struct T1_Decoder_FuncsRec_
904 {
910 FT_Byte** glyph_names,
911 PS_Blend blend,
912 FT_Bool hinting,
913 FT_Render_Mode hint_mode,
915
917 (*done)( T1_Decoder decoder );
918
919#ifdef T1_CONFIG_OPTION_OLD_ENGINE
921 (*parse_charstrings_old)( T1_Decoder decoder,
922 FT_Byte* base,
923 FT_UInt len );
924#else
927 FT_Byte* base,
928 FT_UInt len );
929#endif
930
933 FT_Byte* charstring_base,
934 FT_ULong charstring_len );
935
936
938
939
940 typedef struct T1_DecoderRec_
941 {
943
946
949
950 FT_Service_PsCMaps psnames; /* for seac */
953
954 FT_Int lenIV; /* internal for sub routine calls */
957 FT_UInt* subrs_len; /* array of subrs length (optional) */
958 FT_Hash subrs_hash; /* used if `num_subrs' was massaged */
959
962
966
967 PS_Blend blend; /* for multiple master support */
968
970
973
976
978
980
982
983
984 /*************************************************************************/
985 /*************************************************************************/
986 /***** *****/
987 /***** CFF BUILDER *****/
988 /***** *****/
989 /*************************************************************************/
990 /*************************************************************************/
991
992
993 typedef struct CFF_Builder_ CFF_Builder;
994
995
996 typedef FT_Error
998 FT_Int count );
999
1000 typedef void
1002 FT_Pos x,
1003 FT_Pos y,
1004 FT_Byte flag );
1005 typedef FT_Error
1007 FT_Pos x,
1008 FT_Pos y );
1009 typedef FT_Error
1011 FT_Pos x,
1012 FT_Pos y );
1013 typedef void
1015
1016 typedef FT_Error
1018
1020
1022 {
1024 (*init)( CFF_Builder* builder,
1025 TT_Face face,
1026 CFF_Size size,
1027 CFF_GlyphSlot glyph,
1028 FT_Bool hinting );
1029
1031 (*done)( CFF_Builder* builder );
1032
1039
1041
1042
1043 /**************************************************************************
1044 *
1045 * @struct:
1046 * CFF_Builder
1047 *
1048 * @description:
1049 * A structure used during glyph loading to store its outline.
1050 *
1051 * @fields:
1052 * memory ::
1053 * The current memory object.
1054 *
1055 * face ::
1056 * The current face object.
1057 *
1058 * glyph ::
1059 * The current glyph slot.
1060 *
1061 * loader ::
1062 * The current glyph loader.
1063 *
1064 * base ::
1065 * The base glyph outline.
1066 *
1067 * current ::
1068 * The current glyph outline.
1069 *
1070 * pos_x ::
1071 * The horizontal translation (if composite glyph).
1072 *
1073 * pos_y ::
1074 * The vertical translation (if composite glyph).
1075 *
1076 * left_bearing ::
1077 * The left side bearing point.
1078 *
1079 * advance ::
1080 * The horizontal advance vector.
1081 *
1082 * bbox ::
1083 * Unused.
1084 *
1085 * path_begun ::
1086 * A flag which indicates that a new path has begun.
1087 *
1088 * load_points ::
1089 * If this flag is not set, no points are loaded.
1090 *
1091 * no_recurse ::
1092 * Set but not used.
1093 *
1094 * metrics_only ::
1095 * A boolean indicating that we only want to compute the metrics of a
1096 * given glyph, not load all of its points.
1097 *
1098 * hints_funcs ::
1099 * Auxiliary pointer for hinting.
1100 *
1101 * hints_globals ::
1102 * Auxiliary pointer for hinting.
1103 *
1104 * funcs ::
1105 * A table of method pointers for this object.
1106 */
1108 {
1115
1118
1121
1122 FT_BBox bbox; /* bounding box */
1123
1127
1129
1130 void* hints_funcs; /* hinter-specific */
1131 void* hints_globals; /* hinter-specific */
1132
1134 };
1135
1136
1137 /*************************************************************************/
1138 /*************************************************************************/
1139 /***** *****/
1140 /***** CFF DECODER *****/
1141 /***** *****/
1142 /*************************************************************************/
1143 /*************************************************************************/
1144
1145
1146#define CFF_MAX_OPERANDS 48
1147#define CFF_MAX_SUBRS_CALLS 16 /* maximum subroutine nesting; */
1148 /* only 10 are allowed but there exist */
1149 /* fonts like `HiraKakuProN-W3.ttf' */
1150 /* (Hiragino Kaku Gothic ProN W3; */
1151 /* 8.2d6e1; 2014-12-19) that exceed */
1152 /* this limit */
1153#define CFF_MAX_TRANS_ELEMENTS 32
1154
1155 /* execution context charstring zone */
1156
1157 typedef struct CFF_Decoder_Zone_
1158 {
1162
1164
1165
1166 typedef struct CFF_Decoder_
1167 {
1170
1173
1176
1180
1183
1188
1191
1194
1197
1198 FT_Byte** glyph_names; /* for pure CFF fonts only */
1199 FT_UInt num_glyphs; /* number of glyphs in font */
1200
1202
1204
1205 CFF_SubFont current_subfont; /* for current glyph_index */
1206
1209
1211
1212
1214
1216 {
1219 TT_Face face,
1220 CFF_Size size,
1222 FT_Bool hinting,
1223 FT_Render_Mode hint_mode,
1225 CFF_Decoder_Free_Glyph_Callback free_callback );
1226
1229 CFF_Size size,
1230 FT_UInt glyph_index );
1231
1232#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
1233 FT_Error
1234 (*parse_charstrings_old)( CFF_Decoder* decoder,
1235 FT_Byte* charstring_base,
1236 FT_ULong charstring_len,
1237 FT_Bool in_dict );
1238#endif
1239
1242 FT_Byte* charstring_base,
1243 FT_ULong charstring_len );
1244
1246
1247
1248 /*************************************************************************/
1249 /*************************************************************************/
1250 /***** *****/
1251 /***** AFM PARSER *****/
1252 /***** *****/
1253 /*************************************************************************/
1254 /*************************************************************************/
1255
1257
1259 {
1263 FT_Byte* base,
1264 FT_Byte* limit );
1265
1267 (*done)( AFM_Parser parser );
1268
1270 (*parse)( AFM_Parser parser );
1271
1273
1274
1276
1277
1278 /**************************************************************************
1279 *
1280 * @struct:
1281 * AFM_ParserRec
1282 *
1283 * @description:
1284 * An AFM_Parser is a parser for the AFM files.
1285 *
1286 * @fields:
1287 * memory ::
1288 * The object used for memory operations (alloc and realloc).
1289 *
1290 * stream ::
1291 * This is an opaque object.
1292 *
1293 * FontInfo ::
1294 * The result will be stored here.
1295 *
1296 * get_index ::
1297 * A user provided function to get a glyph index by its name.
1298 */
1299 typedef struct AFM_ParserRec_
1300 {
1303
1305
1307 (*get_index)( const char* name,
1308 FT_Offset len,
1309 void* user_data );
1310
1312
1314
1315
1316 /*************************************************************************/
1317 /*************************************************************************/
1318 /***** *****/
1319 /***** TYPE1 CHARMAPS *****/
1320 /***** *****/
1321 /*************************************************************************/
1322 /*************************************************************************/
1323
1325
1326 typedef struct T1_CMap_ClassesRec_
1327 {
1332
1334
1335
1336 /*************************************************************************/
1337 /*************************************************************************/
1338 /***** *****/
1339 /***** PSAux Module Interface *****/
1340 /***** *****/
1341 /*************************************************************************/
1342 /*************************************************************************/
1343
1344 typedef struct PSAux_ServiceRec_
1345 {
1346 /* don't use `PS_Table_Funcs' and friends to avoid compiler warnings */
1351
1355 FT_UShort seed );
1356
1357 FT_UInt32
1358 (*cff_random)( FT_UInt32 r );
1359
1361 (*ps_decoder_init)( PS_Decoder* ps_decoder,
1362 void* decoder,
1363 FT_Bool is_t1 );
1364
1367 PS_Private priv,
1368 CFF_SubFont subfont );
1369
1371
1372 /* fields after this comment line were added after version 2.1.10 */
1374
1376
1378
1379 /* backward compatible type definition */
1381
1382
1383 /*************************************************************************/
1384 /*************************************************************************/
1385 /***** *****/
1386 /***** Some convenience functions *****/
1387 /***** *****/
1388 /*************************************************************************/
1389 /*************************************************************************/
1390
1391#define IS_PS_NEWLINE( ch ) \
1392 ( (ch) == '\r' || \
1393 (ch) == '\n' )
1394
1395#define IS_PS_SPACE( ch ) \
1396 ( (ch) == ' ' || \
1397 IS_PS_NEWLINE( ch ) || \
1398 (ch) == '\t' || \
1399 (ch) == '\f' || \
1400 (ch) == '\0' )
1401
1402#define IS_PS_SPECIAL( ch ) \
1403 ( (ch) == '/' || \
1404 (ch) == '(' || (ch) == ')' || \
1405 (ch) == '<' || (ch) == '>' || \
1406 (ch) == '[' || (ch) == ']' || \
1407 (ch) == '{' || (ch) == '}' || \
1408 (ch) == '%' )
1409
1410#define IS_PS_DELIM( ch ) \
1411 ( IS_PS_SPACE( ch ) || \
1412 IS_PS_SPECIAL( ch ) )
1413
1414#define IS_PS_DIGIT( ch ) \
1415 ( (ch) >= '0' && (ch) <= '9' )
1416
1417#define IS_PS_XDIGIT( ch ) \
1418 ( IS_PS_DIGIT( ch ) || \
1419 ( (ch) >= 'A' && (ch) <= 'F' ) || \
1420 ( (ch) >= 'a' && (ch) <= 'f' ) )
1421
1422#define IS_PS_BASE85( ch ) \
1423 ( (ch) >= '!' && (ch) <= 'u' )
1424
1425#define IS_PS_TOKEN( cur, limit, token ) \
1426 ( (char)(cur)[0] == (token)[0] && \
1427 ( (cur) + sizeof ( (token) ) == (limit) || \
1428 ( (cur) + sizeof( (token) ) < (limit) && \
1429 IS_PS_DELIM( (cur)[sizeof ( (token) ) - 1] ) ) ) && \
1430 ft_strncmp( (char*)(cur), (token), sizeof ( (token) ) - 1 ) == 0 )
1431
1432
1434
1435#endif /* PSAUX_H_ */
1436
1437
1438/* END */
static unsigned char bytes[4]
Definition: adnsresfilter.c:74
static HRESULT get_callback(IBindCtx *pbc, IBindStatusCallback **callback)
Definition: binding.c:1411
WORD face[3]
Definition: mesh.c:4747
unsigned int idx
Definition: utils.c:41
enum FT_Render_Mode_ FT_Render_Mode
#define FT_END_HEADER
Definition: ftheader.h:57
#define FT_BEGIN_HEADER
Definition: ftheader.h:37
FT_BEGIN_HEADER typedef signed long FT_Pos
Definition: ftimage.h:57
#define T1_MAX_CHARSTRINGS_OPERANDS
Definition: ftoption.h:777
#define T1_MAX_SUBRS_CALLS
Definition: ftoption.h:766
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:64
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
unsigned long FT_ULong
Definition: fttypes.h:253
unsigned char FT_Byte
Definition: fttypes.h:154
signed long FT_Fixed
Definition: fttypes.h:287
int FT_Error
Definition: fttypes.h:299
signed long FT_Long
Definition: fttypes.h:242
unsigned short FT_UShort
Definition: fttypes.h:209
signed short FT_Short
Definition: fttypes.h:198
unsigned int FT_UInt
Definition: fttypes.h:231
size_t FT_Offset
Definition: fttypes.h:323
signed int FT_Int
Definition: fttypes.h:220
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
GLuint coords
Definition: glext.h:7368
GLsizei const GLvoid * pointer
Definition: glext.h:5848
GLint limit
Definition: glext.h:10326
GLboolean GLenum GLenum GLvoid * values
Definition: glext.h:5666
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLenum GLsizei len
Definition: glext.h:6722
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
Definition: glfuncs.h:52
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
static const CLSID * objects[]
Definition: apphelp.c:112
static IPrintDialogCallback callback
Definition: printdlg.c:326
static char memory[1024 *256]
Definition: process.c:122
FT_Error(* CFF_Builder_Start_Point_Func)(CFF_Builder *builder, FT_Pos x, FT_Pos y)
Definition: psaux.h:1010
FT_Error(* CFF_Builder_Check_Points_Func)(CFF_Builder *builder, FT_Int count)
Definition: psaux.h:997
struct T1_Decoder_ZoneRec_ T1_Decoder_ZoneRec
FT_Error(* T1_Decoder_Callback)(T1_Decoder decoder, FT_UInt glyph_index)
Definition: psaux.h:899
struct CFF_Decoder_FuncsRec_ CFF_Decoder_FuncsRec
T1_TokenType_
Definition: psaux.h:185
@ T1_TOKEN_TYPE_STRING
Definition: psaux.h:188
@ T1_TOKEN_TYPE_MAX
Definition: psaux.h:193
@ T1_TOKEN_TYPE_ARRAY
Definition: psaux.h:189
@ T1_TOKEN_TYPE_KEY
Definition: psaux.h:190
@ T1_TOKEN_TYPE_ANY
Definition: psaux.h:187
@ T1_TOKEN_TYPE_NONE
Definition: psaux.h:186
const struct CFF_Builder_FuncsRec_ * CFF_Builder_Funcs
Definition: psaux.h:1019
struct PSAux_ServiceRec_ PSAux_ServiceRec
#define CFF_MAX_OPERANDS
Definition: psaux.h:1146
FT_BEGIN_HEADER struct PS_DriverRec_ * PS_Driver
void(* CFF_Builder_Close_Contour_Func)(CFF_Builder *builder)
Definition: psaux.h:1014
struct T1_DecoderRec_ * T1_Decoder
Definition: psaux.h:894
struct T1_TokenRec_ T1_TokenRec
struct PS_Builder_FuncsRec_ PS_Builder_FuncsRec
struct T1_FieldRec_ T1_FieldRec
const struct PS_Builder_FuncsRec_ * PS_Builder_Funcs
Definition: psaux.h:487
PSAux_ServiceRec PSAux_Interface
Definition: psaux.h:1380
const struct T1_Builder_FuncsRec_ * T1_Builder_Funcs
Definition: psaux.h:728
struct T1_Decoder_ZoneRec_ * T1_Decoder_Zone
#define CFF_MAX_SUBRS_CALLS
Definition: psaux.h:1147
struct PS_Parser_FuncsRec_ PS_Parser_FuncsRec
struct T1_BuilderRec_ * T1_Builder
Definition: psaux.h:698
const struct T1_CMap_ClassesRec_ * T1_CMap_Classes
Definition: psaux.h:1324
enum T1_FieldType_ T1_FieldType
void(* T1_Builder_Close_Contour_Func)(T1_Builder builder)
Definition: psaux.h:725
struct PS_Decoder_ PS_Decoder
FT_BEGIN_HEADER struct PS_DriverRec_ PS_DriverRec
FT_Error(* T1_Builder_Check_Points_Func)(T1_Builder builder, FT_Int count)
Definition: psaux.h:702
T1_ParseState_
Definition: psaux.h:754
@ T1_Parse_Have_Width
Definition: psaux.h:756
@ T1_Parse_Have_Path
Definition: psaux.h:758
@ T1_Parse_Start
Definition: psaux.h:755
@ T1_Parse_Have_Moveto
Definition: psaux.h:757
struct T1_BuilderRec_ T1_BuilderRec
void(* CFF_Builder_Add_Point_Func)(CFF_Builder *builder, FT_Pos x, FT_Pos y, FT_Byte flag)
Definition: psaux.h:1001
FT_Error(* CFF_Builder_Add_Contour_Func)(CFF_Builder *builder)
Definition: psaux.h:1017
struct AFM_ParserRec_ * AFM_Parser
Definition: psaux.h:1256
struct CFF_Builder_FuncsRec_ CFF_Builder_FuncsRec
#define PS_MAX_OPERANDS
Definition: psaux.h:599
FT_Error(* CFF_Decoder_Get_Glyph_Callback)(TT_Face face, FT_UInt glyph_index, FT_Byte **pointer, FT_ULong *length)
Definition: psaux.h:619
void(* T1_Field_ParseFunc)(FT_Face face, FT_Pointer parser)
Definition: psaux.h:249
FT_Error(* CFF_Builder_Add_Point1_Func)(CFF_Builder *builder, FT_Pos x, FT_Pos y)
Definition: psaux.h:1006
struct PSAux_ServiceRec_ * PSAux_Service
enum T1_FieldLocation_ T1_FieldLocation
T1_FieldType_
Definition: psaux.h:210
@ T1_FIELD_TYPE_KEY
Definition: psaux.h:217
@ T1_FIELD_TYPE_INTEGER_ARRAY
Definition: psaux.h:220
@ T1_FIELD_TYPE_BBOX
Definition: psaux.h:218
@ T1_FIELD_TYPE_FIXED_1000
Definition: psaux.h:215
@ T1_FIELD_TYPE_STRING
Definition: psaux.h:216
@ T1_FIELD_TYPE_FIXED
Definition: psaux.h:214
@ T1_FIELD_TYPE_NONE
Definition: psaux.h:211
@ T1_FIELD_TYPE_MAX
Definition: psaux.h:225
@ T1_FIELD_TYPE_CALLBACK
Definition: psaux.h:222
@ T1_FIELD_TYPE_INTEGER
Definition: psaux.h:213
@ T1_FIELD_TYPE_FIXED_ARRAY
Definition: psaux.h:221
@ T1_FIELD_TYPE_MM_BBOX
Definition: psaux.h:219
@ T1_FIELD_TYPE_BOOL
Definition: psaux.h:212
struct PS_Decoder_Zone_ PS_Decoder_Zone
enum T1_ParseState_ T1_ParseState
struct T1_CMap_ClassesRec_ T1_CMap_ClassesRec
void(* CFF_Decoder_Free_Glyph_Callback)(TT_Face face, FT_Byte **pointer, FT_ULong length)
Definition: psaux.h:625
struct CFF_Decoder_Zone_ CFF_Decoder_Zone
struct AFM_Parser_FuncsRec_ AFM_Parser_FuncsRec
struct T1_TokenRec_ * T1_Token
Definition: psaux.h:178
struct T1_Decoder_FuncsRec_ T1_Decoder_FuncsRec
struct T1_DecoderRec_ T1_DecoderRec
void(* T1_Builder_Add_Point_Func)(T1_Builder builder, FT_Pos x, FT_Pos y, FT_Byte flag)
Definition: psaux.h:706
FT_Error(* T1_Builder_Add_Contour_Func)(T1_Builder builder)
Definition: psaux.h:717
#define CFF_MAX_TRANS_ELEMENTS
Definition: psaux.h:1153
struct PS_ParserRec_ * PS_Parser
Definition: psaux.h:176
struct PS_TableRec_ * PS_Table
Definition: psaux.h:62
const struct PS_Parser_FuncsRec_ * PS_Parser_Funcs
Definition: psaux.h:370
const struct CFF_Decoder_FuncsRec_ * CFF_Decoder_Funcs
Definition: psaux.h:1213
#define PS_MAX_SUBRS_CALLS
Definition: psaux.h:600
struct CFF_Decoder_ CFF_Decoder
struct PS_ParserRec_ PS_ParserRec
FT_Error(* T1_Builder_Start_Point_Func)(T1_Builder builder, FT_Pos x, FT_Pos y)
Definition: psaux.h:720
struct AFM_ParserRec_ AFM_ParserRec
const struct T1_Decoder_FuncsRec_ * T1_Decoder_Funcs
Definition: psaux.h:895
const struct PS_Table_FuncsRec_ * PS_Table_Funcs
Definition: psaux.h:63
struct PS_Table_FuncsRec_ PS_Table_FuncsRec
enum T1_TokenType_ T1_TokenType
struct T1_Builder_FuncsRec_ T1_Builder_FuncsRec
FT_Error(* T1_Builder_Add_Point1_Func)(T1_Builder builder, FT_Pos x, FT_Pos y)
Definition: psaux.h:712
struct AFM_StreamRec_ * AFM_Stream
Definition: psaux.h:1275
struct PS_TableRec_ PS_TableRec
T1_FieldLocation_
Definition: psaux.h:231
@ T1_FIELD_LOCATION_FONT_EXTRA
Definition: psaux.h:234
@ T1_FIELD_LOCATION_BLEND
Definition: psaux.h:240
@ T1_FIELD_LOCATION_CID_INFO
Definition: psaux.h:232
@ T1_FIELD_LOCATION_BBOX
Definition: psaux.h:237
@ T1_FIELD_LOCATION_PRIVATE
Definition: psaux.h:236
@ T1_FIELD_LOCATION_LOADER
Definition: psaux.h:238
@ T1_FIELD_LOCATION_FONT_INFO
Definition: psaux.h:235
@ T1_FIELD_LOCATION_FACE
Definition: psaux.h:239
@ T1_FIELD_LOCATION_MAX
Definition: psaux.h:243
@ T1_FIELD_LOCATION_FONT_DICT
Definition: psaux.h:233
struct T1_FieldRec_ * T1_Field
Definition: psaux.h:180
FT_Memory memory
Definition: psaux.h:1301
FT_Int(* get_index)(const char *name, FT_Offset len, void *user_data)
Definition: psaux.h:1307
void * user_data
Definition: psaux.h:1311
AFM_Stream stream
Definition: psaux.h:1302
AFM_FontInfo FontInfo
Definition: psaux.h:1304
FT_Error(* init)(AFM_Parser parser, FT_Memory memory, FT_Byte *base, FT_Byte *limit)
Definition: psaux.h:1261
FT_Error(* parse)(AFM_Parser parser)
Definition: psaux.h:1270
void(* done)(AFM_Parser parser)
Definition: psaux.h:1267
CFF_Builder_Check_Points_Func check_points
Definition: psaux.h:1033
CFF_Builder_Add_Point_Func add_point
Definition: psaux.h:1034
CFF_Builder_Add_Contour_Func add_contour
Definition: psaux.h:1036
void(* init)(CFF_Builder *builder, TT_Face face, CFF_Size size, CFF_GlyphSlot glyph, FT_Bool hinting)
Definition: psaux.h:1024
CFF_Builder_Close_Contour_Func close_contour
Definition: psaux.h:1038
CFF_Builder_Add_Point1_Func add_point1
Definition: psaux.h:1035
CFF_Builder_Start_Point_Func start_point
Definition: psaux.h:1037
void(* done)(CFF_Builder *builder)
Definition: psaux.h:1031
FT_Pos pos_x
Definition: psaux.h:1116
FT_Vector left_bearing
Definition: psaux.h:1119
FT_GlyphLoader loader
Definition: psaux.h:1112
TT_Face face
Definition: psaux.h:1110
FT_Memory memory
Definition: psaux.h:1109
FT_Pos pos_y
Definition: psaux.h:1117
CFF_GlyphSlot glyph
Definition: psaux.h:1111
FT_Bool metrics_only
Definition: psaux.h:1128
void * hints_globals
Definition: psaux.h:1131
FT_BBox bbox
Definition: psaux.h:1122
FT_Outline * base
Definition: psaux.h:1113
void * hints_funcs
Definition: psaux.h:1130
FT_Vector advance
Definition: psaux.h:1120
CFF_Builder_FuncsRec funcs
Definition: psaux.h:1133
FT_Bool load_points
Definition: psaux.h:1125
FT_Bool path_begun
Definition: psaux.h:1124
FT_Outline * current
Definition: psaux.h:1114
FT_Bool no_recurse
Definition: psaux.h:1126
FT_Error(* prepare)(CFF_Decoder *decoder, CFF_Size size, FT_UInt glyph_index)
Definition: psaux.h:1228
FT_Error(* parse_charstrings)(PS_Decoder *decoder, FT_Byte *charstring_base, FT_ULong charstring_len)
Definition: psaux.h:1241
void(* init)(CFF_Decoder *decoder, TT_Face face, CFF_Size size, CFF_GlyphSlot slot, FT_Bool hinting, FT_Render_Mode hint_mode, CFF_Decoder_Get_Glyph_Callback get_callback, CFF_Decoder_Free_Glyph_Callback free_callback)
Definition: psaux.h:1218
FT_Byte * cursor
Definition: psaux.h:1161
FT_Byte * limit
Definition: psaux.h:1160
FT_Byte * base
Definition: psaux.h:1159
FT_Vector flex_vectors[7]
Definition: psaux.h:1179
FT_Byte ** glyph_names
Definition: psaux.h:1198
FT_Pos glyph_width
Definition: psaux.h:1181
FT_Bool width_only
Definition: psaux.h:1185
CFF_Builder builder
Definition: psaux.h:1168
FT_Bool read_width
Definition: psaux.h:1184
FT_Int flex_state
Definition: psaux.h:1177
FT_Fixed * top
Definition: psaux.h:1172
FT_Int num_hints
Definition: psaux.h:1186
CFF_Decoder_Get_Glyph_Callback get_glyph_callback
Definition: psaux.h:1207
FT_Int locals_bias
Definition: psaux.h:1192
FT_UInt num_globals
Definition: psaux.h:1190
FT_Pos nominal_width
Definition: psaux.h:1182
FT_Bool seac
Definition: psaux.h:1203
CFF_Font cff
Definition: psaux.h:1169
FT_Fixed buildchar[CFF_MAX_TRANS_ELEMENTS]
Definition: psaux.h:1187
FT_Render_Mode hint_mode
Definition: psaux.h:1201
FT_Byte ** locals
Definition: psaux.h:1195
CFF_Decoder_Zone * zone
Definition: psaux.h:1175
FT_UInt num_glyphs
Definition: psaux.h:1199
CFF_Decoder_Zone zones[CFF_MAX_SUBRS_CALLS+1]
Definition: psaux.h:1174
FT_Int globals_bias
Definition: psaux.h:1193
FT_Byte ** globals
Definition: psaux.h:1196
CFF_Decoder_Free_Glyph_Callback free_glyph_callback
Definition: psaux.h:1208
CFF_SubFont current_subfont
Definition: psaux.h:1205
FT_UInt num_locals
Definition: psaux.h:1189
FT_Int num_flex_vectors
Definition: psaux.h:1178
void(* ps_decoder_init)(PS_Decoder *ps_decoder, void *decoder, FT_Bool is_t1)
Definition: psaux.h:1361
FT_UInt32(* cff_random)(FT_UInt32 r)
Definition: psaux.h:1358
const T1_Builder_FuncsRec * t1_builder_funcs
Definition: psaux.h:1349
T1_CMap_Classes t1_cmap_classes
Definition: psaux.h:1370
void(* t1_make_subfont)(FT_Face face, PS_Private priv, CFF_SubFont subfont)
Definition: psaux.h:1366
const T1_Decoder_FuncsRec * t1_decoder_funcs
Definition: psaux.h:1350
void(* t1_decrypt)(FT_Byte *buffer, FT_Offset length, FT_UShort seed)
Definition: psaux.h:1353
const AFM_Parser_FuncsRec * afm_parser_funcs
Definition: psaux.h:1373
const PS_Parser_FuncsRec * ps_parser_funcs
Definition: psaux.h:1348
const CFF_Decoder_FuncsRec * cff_decoder_funcs
Definition: psaux.h:1375
const PS_Table_FuncsRec * ps_table_funcs
Definition: psaux.h:1347
void(* init)(PS_Builder *ps_builder, void *builder, FT_Bool is_t1)
Definition: psaux.h:492
void(* done)(PS_Builder *builder)
Definition: psaux.h:497
FT_Bool load_points
Definition: psaux.h:580
FT_Vector * advance
Definition: psaux.h:576
FT_Vector * left_bearing
Definition: psaux.h:575
CFF_GlyphSlot glyph
Definition: psaux.h:567
FT_Pos * pos_y
Definition: psaux.h:573
FT_Bool no_recurse
Definition: psaux.h:581
FT_Memory memory
Definition: psaux.h:565
FT_GlyphLoader loader
Definition: psaux.h:568
FT_Pos * pos_x
Definition: psaux.h:572
PS_Builder_FuncsRec funcs
Definition: psaux.h:586
FT_Bool path_begun
Definition: psaux.h:579
FT_Bool is_t1
Definition: psaux.h:584
FT_BBox * bbox
Definition: psaux.h:578
FT_Outline * base
Definition: psaux.h:569
FT_Face face
Definition: psaux.h:566
FT_Outline * current
Definition: psaux.h:570
FT_Bool metrics_only
Definition: psaux.h:583
FT_Byte * limit
Definition: psaux.h:612
FT_Byte * cursor
Definition: psaux.h:613
FT_Byte * base
Definition: psaux.h:611
FT_Generic * cf2_instance
Definition: psaux.h:646
FT_Matrix font_matrix
Definition: psaux.h:678
FT_Byte ** globals
Definition: psaux.h:659
FT_Byte ** glyph_names
Definition: psaux.h:661
FT_UInt num_globals
Definition: psaux.h:653
FT_Int num_flex_vectors
Definition: psaux.h:641
PS_Decoder_Zone * zone
Definition: psaux.h:638
FT_Render_Mode hint_mode
Definition: psaux.h:664
FT_Hash locals_hash
Definition: psaux.h:676
CFF_SubFont current_subfont
Definition: psaux.h:645
FT_UInt num_glyphs
Definition: psaux.h:662
FT_Long * buildchar
Definition: psaux.h:683
CFF_Font cff
Definition: psaux.h:644
FT_Bool seac
Definition: psaux.h:666
FT_Byte ** locals
Definition: psaux.h:658
FT_Vector font_offset
Definition: psaux.h:679
CFF_Decoder_Get_Glyph_Callback get_glyph_callback
Definition: psaux.h:668
FT_UInt len_buildchar
Definition: psaux.h:684
PS_Decoder_Zone zones[PS_MAX_SUBRS_CALLS+1]
Definition: psaux.h:637
FT_Fixed * top
Definition: psaux.h:635
FT_Int flex_state
Definition: psaux.h:640
FT_Vector flex_vectors[7]
Definition: psaux.h:642
FT_Int lenIV
Definition: psaux.h:674
FT_UInt num_locals
Definition: psaux.h:652
FT_Int num_hints
Definition: psaux.h:650
FT_UInt * locals_len
Definition: psaux.h:675
CFF_Decoder_Free_Glyph_Callback free_glyph_callback
Definition: psaux.h:669
FT_Int globals_bias
Definition: psaux.h:656
FT_Bool width_only
Definition: psaux.h:649
PS_Builder builder
Definition: psaux.h:632
FT_Service_PsCMaps psnames
Definition: psaux.h:672
PS_Blend blend
Definition: psaux.h:681
FT_Pos * glyph_width
Definition: psaux.h:648
FT_Int locals_bias
Definition: psaux.h:655
FT_Int darken_params[8]
Definition: psaux.h:47
FT_UInt hinting_engine
Definition: psaux.h:45
FT_DriverRec root
Definition: psaux.h:43
FT_Bool no_stem_darkening
Definition: psaux.h:46
FT_Int32 random_seed
Definition: psaux.h:48
FT_Byte * base
Definition: psaux.h:467
FT_Memory memory
Definition: psaux.h:470
PS_Parser_FuncsRec funcs
Definition: psaux.h:472
FT_Byte * cursor
Definition: psaux.h:466
FT_Error error
Definition: psaux.h:469
FT_Byte * limit
Definition: psaux.h:468
void(* to_token)(PS_Parser parser, T1_Token token)
Definition: psaux.h:412
FT_Error(* load_field_table)(PS_Parser parser, const T1_Field field, void **objects, FT_UInt max_objects, FT_ULong *pflags)
Definition: psaux.h:428
FT_Long(* to_int)(PS_Parser parser)
Definition: psaux.h:389
FT_Error(* to_bytes)(PS_Parser parser, FT_Byte *bytes, FT_Offset max_bytes, FT_ULong *pnum_bytes, FT_Bool delimiters)
Definition: psaux.h:395
void(* skip_spaces)(PS_Parser parser)
Definition: psaux.h:384
FT_Error(* load_field)(PS_Parser parser, const T1_Field field, void **objects, FT_UInt max_objects, FT_ULong *pflags)
Definition: psaux.h:421
void(* skip_PS_token)(PS_Parser parser)
Definition: psaux.h:386
void(* done)(PS_Parser parser)
Definition: psaux.h:381
FT_Int(* to_fixed_array)(PS_Parser parser, FT_Int max_values, FT_Fixed *values, FT_Int power_ten)
Definition: psaux.h:406
void(* init)(PS_Parser parser, FT_Byte *base, FT_Byte *limit, FT_Memory memory)
Definition: psaux.h:375
FT_Int(* to_coord_array)(PS_Parser parser, FT_Int max_coords, FT_Short *coords)
Definition: psaux.h:402
FT_Fixed(* to_fixed)(PS_Parser parser, FT_Int power_ten)
Definition: psaux.h:391
void(* to_token_array)(PS_Parser parser, T1_Token tokens, FT_UInt max_tokens, FT_Int *pnum_tokens)
Definition: psaux.h:415
FT_Memory memory
Definition: psaux.h:162
FT_Byte ** elements
Definition: psaux.h:159
FT_Int num_elems
Definition: psaux.h:158
FT_ULong init
Definition: psaux.h:155
FT_Byte * block
Definition: psaux.h:152
FT_Int max_elems
Definition: psaux.h:157
FT_Offset cursor
Definition: psaux.h:153
FT_Offset capacity
Definition: psaux.h:154
PS_Table_FuncsRec funcs
Definition: psaux.h:163
FT_UInt * lengths
Definition: psaux.h:160
FT_Error(* init)(PS_Table table, FT_Int count, FT_Memory memory)
Definition: psaux.h:90
void(* release)(PS_Table table)
Definition: psaux.h:104
void(* done)(PS_Table table)
Definition: psaux.h:95
FT_Error(* add)(PS_Table table, FT_Int idx, const void *object, FT_UInt length)
Definition: psaux.h:98
FT_Bool no_recurse
Definition: psaux.h:845
FT_GlyphSlot glyph
Definition: psaux.h:831
FT_Vector advance
Definition: psaux.h:840
FT_BBox bbox
Definition: psaux.h:842
FT_Outline * base
Definition: psaux.h:833
FT_Face face
Definition: psaux.h:830
FT_Outline * current
Definition: psaux.h:834
FT_Vector left_bearing
Definition: psaux.h:839
FT_Bool metrics_only
Definition: psaux.h:847
FT_Memory memory
Definition: psaux.h:829
FT_Bool load_points
Definition: psaux.h:844
T1_Builder_FuncsRec funcs
Definition: psaux.h:852
FT_Pos pos_y
Definition: psaux.h:837
FT_Pos pos_x
Definition: psaux.h:836
FT_GlyphLoader loader
Definition: psaux.h:832
void * hints_globals
Definition: psaux.h:850
void * hints_funcs
Definition: psaux.h:849
T1_ParseState parse_state
Definition: psaux.h:843
T1_Builder_Check_Points_Func check_points
Definition: psaux.h:742
T1_Builder_Add_Point1_Func add_point1
Definition: psaux.h:744
void(* init)(T1_Builder builder, FT_Face face, FT_Size size, FT_GlyphSlot slot, FT_Bool hinting)
Definition: psaux.h:733
T1_Builder_Add_Point_Func add_point
Definition: psaux.h:743
T1_Builder_Start_Point_Func start_point
Definition: psaux.h:746
void(* done)(T1_Builder builder)
Definition: psaux.h:740
T1_Builder_Close_Contour_Func close_contour
Definition: psaux.h:747
T1_Builder_Add_Contour_Func add_contour
Definition: psaux.h:745
FT_CMap_Class standard
Definition: psaux.h:1328
FT_CMap_Class custom
Definition: psaux.h:1330
FT_CMap_Class expert
Definition: psaux.h:1329
FT_CMap_Class unicode
Definition: psaux.h:1331
FT_Byte ** subrs
Definition: psaux.h:956
FT_Matrix font_matrix
Definition: psaux.h:960
FT_UInt * subrs_len
Definition: psaux.h:957
PS_Blend blend
Definition: psaux.h:967
FT_UInt num_glyphs
Definition: psaux.h:951
FT_Int flex_state
Definition: psaux.h:963
FT_Render_Mode hint_mode
Definition: psaux.h:969
FT_Int num_flex_vectors
Definition: psaux.h:964
FT_Vector flex_vectors[7]
Definition: psaux.h:965
FT_Bool seac
Definition: psaux.h:977
T1_Decoder_ZoneRec zones[T1_MAX_SUBRS_CALLS+1]
Definition: psaux.h:947
FT_UInt len_buildchar
Definition: psaux.h:975
FT_Long * top
Definition: psaux.h:945
T1_Decoder_FuncsRec funcs
Definition: psaux.h:972
FT_Int num_subrs
Definition: psaux.h:955
T1_BuilderRec builder
Definition: psaux.h:942
T1_Decoder_Callback parse_callback
Definition: psaux.h:971
FT_Vector font_offset
Definition: psaux.h:961
FT_Long * buildchar
Definition: psaux.h:974
FT_Service_PsCMaps psnames
Definition: psaux.h:950
FT_Hash subrs_hash
Definition: psaux.h:958
FT_Byte ** glyph_names
Definition: psaux.h:952
T1_Decoder_Zone zone
Definition: psaux.h:948
FT_Int lenIV
Definition: psaux.h:954
FT_Generic cf2_instance
Definition: psaux.h:979
void(* done)(T1_Decoder decoder)
Definition: psaux.h:917
FT_Error(* parse_charstrings)(PS_Decoder *decoder, FT_Byte *charstring_base, FT_ULong charstring_len)
Definition: psaux.h:932
FT_Error(* parse_metrics)(T1_Decoder decoder, FT_Byte *base, FT_UInt len)
Definition: psaux.h:926
FT_Error(* init)(T1_Decoder decoder, FT_Face face, FT_Size size, FT_GlyphSlot slot, FT_Byte **glyph_names, PS_Blend blend, FT_Bool hinting, FT_Render_Mode hint_mode, T1_Decoder_Callback callback)
Definition: psaux.h:906
FT_Byte * cursor
Definition: psaux.h:887
FT_Byte * limit
Definition: psaux.h:889
FT_Byte * base
Definition: psaux.h:888
T1_FieldLocation location
Definition: psaux.h:257
FT_UInt offset
Definition: psaux.h:260
FT_UInt count_offset
Definition: psaux.h:264
FT_UInt dict
Definition: psaux.h:270
FT_UInt array_max
Definition: psaux.h:262
FT_Byte size
Definition: psaux.h:261
T1_Field_ParseFunc reader
Definition: psaux.h:259
const char * ident
Definition: psaux.h:256
T1_FieldType type
Definition: psaux.h:258
FT_Byte * start
Definition: psaux.h:201
T1_TokenType type
Definition: psaux.h:203
FT_Byte * limit
Definition: psaux.h:202
Definition: parser.c:44
Definition: name.c:39
Definition: import.c:81
Definition: format.c:80
struct _slot slot
Definition: vfat.h:196