ReactOS 0.4.16-dev-2354-g16de117
psauxmod.c
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * psauxmod.c
4 *
5 * FreeType auxiliary PostScript module implementation (body).
6 *
7 * Copyright (C) 2000-2020 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#include "psauxmod.h"
20#include "psobjs.h"
21#include "t1decode.h"
22#include "t1cmap.h"
23#include "psft.h"
24#include "cffdecode.h"
25
26#ifndef T1_CONFIG_OPTION_NO_AFM
27#include "afmparse.h"
28#endif
29
30
33 {
34 ps_table_new, /* init */
35 ps_table_done, /* done */
36 ps_table_add, /* add */
37 ps_table_release /* release */
38 };
39
40
43 {
44 ps_parser_init, /* init */
45 ps_parser_done, /* done */
46
47 ps_parser_skip_spaces, /* skip_spaces */
48 ps_parser_skip_PS_token, /* skip_PS_token */
49
50 ps_parser_to_int, /* to_int */
51 ps_parser_to_fixed, /* to_fixed */
52 ps_parser_to_bytes, /* to_bytes */
53 ps_parser_to_coord_array, /* to_coord_array */
54 ps_parser_to_fixed_array, /* to_fixed_array */
55 ps_parser_to_token, /* to_token */
56 ps_parser_to_token_array, /* to_token_array */
57
58 ps_parser_load_field, /* load_field */
59 ps_parser_load_field_table /* load_field_table */
60 };
61
62
65 {
66 ps_builder_init, /* init */
67 ps_builder_done /* done */
68 };
69
70
73 {
74 t1_builder_init, /* init */
75 t1_builder_done, /* done */
76
77 t1_builder_check_points, /* check_points */
78 t1_builder_add_point, /* add_point */
79 t1_builder_add_point1, /* add_point1 */
80 t1_builder_add_contour, /* add_contour */
81 t1_builder_start_point, /* start_point */
82 t1_builder_close_contour /* close_contour */
83 };
84
85
88 {
89 t1_decoder_init, /* init */
90 t1_decoder_done, /* done */
91#ifdef T1_CONFIG_OPTION_OLD_ENGINE
92 t1_decoder_parse_charstrings, /* parse_charstrings_old */
93#else
94 t1_decoder_parse_metrics, /* parse_metrics */
95#endif
96 cf2_decoder_parse_charstrings /* parse_charstrings */
97 };
98
99
100#ifndef T1_CONFIG_OPTION_NO_AFM
103 {
104 afm_parser_init, /* init */
105 afm_parser_done, /* done */
106 afm_parser_parse /* parse */
107 };
108#endif
109
110
113 {
118 };
119
120
123 {
124 cff_builder_init, /* init */
125 cff_builder_done, /* done */
126
127 cff_check_points, /* check_points */
128 cff_builder_add_point, /* add_point */
129 cff_builder_add_point1, /* add_point1 */
130 cff_builder_add_contour, /* add_contour */
131 cff_builder_start_point, /* start_point */
132 cff_builder_close_contour /* close_contour */
133 };
134
135
138 {
139 cff_decoder_init, /* init */
140 cff_decoder_prepare, /* prepare */
141
142#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
143 cff_decoder_parse_charstrings, /* parse_charstrings_old */
144#endif
145 cf2_decoder_parse_charstrings /* parse_charstrings */
146 };
147
148
149 static
151 {
160
162
163#ifndef T1_CONFIG_OPTION_NO_AFM
165#else
166 0,
167#endif
168
170 };
171
172
174 psaux_module_class,
175
176 0,
177 sizeof ( FT_ModuleRec ),
178 "psaux",
179 0x20000L,
180 0x20000L,
181
182 &psaux_interface, /* module-specific interface */
183
184 (FT_Module_Constructor)NULL, /* module_init */
185 (FT_Module_Destructor) NULL, /* module_done */
186 (FT_Module_Requester) NULL /* get_interface */
187 )
188
189
190/* END */
afm_parser_init(AFM_Parser parser, FT_Memory memory, FT_Byte *base, FT_Byte *limit)
Definition: afmparse.c:529
afm_parser_parse(AFM_Parser parser)
Definition: afmparse.c:861
afm_parser_done(AFM_Parser parser)
Definition: afmparse.c:557
cff_decoder_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: cffdecode.c:2329
cff_decoder_prepare(CFF_Decoder *decoder, CFF_Size size, FT_UInt glyph_index)
Definition: cffdecode.c:2365
#define FT_CALLBACK_TABLE_DEF
#define NULL
Definition: types.h:112
void(* FT_Module_Destructor)(FT_Module module)
Definition: ftmodapi.h:168
FT_Error(* FT_Module_Constructor)(FT_Module module)
Definition: ftmodapi.h:152
FT_Module_Interface(* FT_Module_Requester)(FT_Module module, const char *name)
Definition: ftmodapi.h:187
#define FT_DEFINE_MODULE( class_, flags_, size_, name_, version_, requires_, interface_, init_, done_, get_interface_)
Definition: ftobjs.h:1203
FT_CALLBACK_TABLE_DEF const CFF_Builder_FuncsRec cff_builder_funcs
Definition: psauxmod.c:122
FT_CALLBACK_TABLE_DEF const T1_Decoder_FuncsRec t1_decoder_funcs
Definition: psauxmod.c:87
FT_CALLBACK_TABLE_DEF const PS_Builder_FuncsRec ps_builder_funcs
Definition: psauxmod.c:64
FT_CALLBACK_TABLE_DEF const T1_CMap_ClassesRec t1_cmap_classes
Definition: psauxmod.c:112
FT_CALLBACK_TABLE_DEF const T1_Builder_FuncsRec t1_builder_funcs
Definition: psauxmod.c:72
static const PSAux_Interface psaux_interface
Definition: psauxmod.c:150
FT_CALLBACK_TABLE_DEF const PS_Table_FuncsRec ps_table_funcs
Definition: psauxmod.c:32
FT_CALLBACK_TABLE_DEF const PS_Parser_FuncsRec ps_parser_funcs
Definition: psauxmod.c:42
FT_CALLBACK_TABLE_DEF const CFF_Decoder_FuncsRec cff_decoder_funcs
Definition: psauxmod.c:137
FT_CALLBACK_TABLE_DEF const AFM_Parser_FuncsRec afm_parser_funcs
Definition: psauxmod.c:102
cf2_decoder_parse_charstrings(PS_Decoder *decoder, FT_Byte *charstring_base, FT_ULong charstring_len)
Definition: psft.c:308
cff_builder_add_point1(CFF_Builder *builder, FT_Pos x, FT_Pos y)
Definition: psobjs.c:1965
ps_parser_skip_PS_token(PS_Parser parser)
Definition: psobjs.c:517
t1_builder_close_contour(T1_Builder builder)
Definition: psobjs.c:1753
cff_builder_add_point(CFF_Builder *builder, FT_Pos x, FT_Pos y, FT_Byte flag)
Definition: psobjs.c:1927
ps_parser_to_fixed(PS_Parser parser, FT_Int power_ten)
Definition: psobjs.c:1469
ps_parser_to_token_array(PS_Parser parser, T1_Token tokens, FT_UInt max_tokens, FT_Int *pnum_tokens)
Definition: psobjs.c:728
ps_decoder_init(PS_Decoder *ps_decoder, void *decoder, FT_Bool is_t1)
Definition: psobjs.c:2422
ps_builder_init(PS_Builder *ps_builder, void *builder, FT_Bool is_t1)
Definition: psobjs.c:2118
ps_parser_init(PS_Parser parser, FT_Byte *base, FT_Byte *limit, FT_Memory memory)
Definition: psobjs.c:1519
t1_builder_start_point(T1_Builder builder, FT_Pos x, FT_Pos y)
Definition: psobjs.c:1728
t1_builder_init(T1_Builder builder, FT_Face face, FT_Size size, FT_GlyphSlot glyph, FT_Bool hinting)
Definition: psobjs.c:1574
ps_table_done(PS_Table table)
Definition: psobjs.c:243
t1_builder_add_point1(T1_Builder builder, FT_Pos x, FT_Pos y)
Definition: psobjs.c:1676
cff_check_points(CFF_Builder *builder, FT_Int count)
Definition: psobjs.c:1918
t1_builder_check_points(T1_Builder builder, FT_Int count)
Definition: psobjs.c:1643
ps_parser_to_coord_array(PS_Parser parser, FT_Int max_coords, FT_Short *coords)
Definition: psobjs.c:1478
ps_table_release(PS_Table table)
Definition: psobjs.c:267
ps_parser_load_field_table(PS_Parser parser, const T1_Field field, void **objects, FT_UInt max_objects, FT_ULong *pflags)
Definition: psobjs.c:1329
ps_parser_to_int(PS_Parser parser)
Definition: psobjs.c:1406
ps_parser_to_token(PS_Parser parser, T1_Token token)
Definition: psobjs.c:625
ps_parser_skip_spaces(PS_Parser parser)
Definition: psobjs.c:615
t1_builder_done(T1_Builder builder)
Definition: psobjs.c:1631
cff_builder_start_point(CFF_Builder *builder, FT_Pos x, FT_Pos y)
Definition: psobjs.c:2010
cff_random(FT_UInt32 r)
Definition: psobjs.c:2587
ps_parser_to_bytes(PS_Parser parser, FT_Byte *bytes, FT_Offset max_bytes, FT_ULong *pnum_bytes, FT_Bool delimiters)
Definition: psobjs.c:1416
ps_table_new(PS_Table table, FT_Int count, FT_Memory memory)
Definition: psobjs.c:73
t1_builder_add_point(T1_Builder builder, FT_Pos x, FT_Pos y, FT_Byte flag)
Definition: psobjs.c:1652
t1_decrypt(FT_Byte *buffer, FT_Offset length, FT_UShort seed)
Definition: psobjs.c:2574
t1_make_subfont(FT_Face face, PS_Private priv, CFF_SubFont subfont)
Definition: psobjs.c:2489
t1_builder_add_contour(T1_Builder builder)
Definition: psobjs.c:1693
ps_parser_done(PS_Parser parser)
Definition: psobjs.c:1534
ps_builder_done(PS_Builder *builder)
Definition: psobjs.c:2195
ps_table_add(PS_Table table, FT_Int idx, const void *object, FT_UInt length)
Definition: psobjs.c:176
cff_builder_done(CFF_Builder *builder)
Definition: psobjs.c:1906
cff_builder_init(CFF_Builder *builder, TT_Face face, CFF_Size size, CFF_GlyphSlot glyph, FT_Bool hinting)
Definition: psobjs.c:1840
cff_builder_add_contour(CFF_Builder *builder)
Definition: psobjs.c:1982
ps_parser_to_fixed_array(PS_Parser parser, FT_Int max_values, FT_Fixed *values, FT_Int power_ten)
Definition: psobjs.c:1489
cff_builder_close_contour(CFF_Builder *builder)
Definition: psobjs.c:2032
ps_parser_load_field(PS_Parser parser, const T1_Field field, void **objects, FT_UInt max_objects, FT_ULong *pflags)
Definition: psobjs.c:1032
FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec t1_cmap_expert_class_rec
Definition: t1cmap.c:164
FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec t1_cmap_custom_class_rec
Definition: t1cmap.c:264
FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec t1_cmap_unicode_class_rec
Definition: t1cmap.c:357
FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec t1_cmap_standard_class_rec
Definition: t1cmap.c:135
t1_decoder_parse_metrics(T1_Decoder decoder, FT_Byte *charstring_base, FT_UInt charstring_len)
Definition: t1decode.c:1691
t1_decoder_done(T1_Decoder decoder)
Definition: t1decode.c:2139
t1_decoder_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 parse_callback)
Definition: t1decode.c:2091