ReactOS 0.4.16-dev-319-g6cf4263
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 2000-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#include <ft2build.h>
20#include "psauxmod.h"
21#include "psobjs.h"
22#include "t1decode.h"
23#include "t1cmap.h"
24#include "psft.h"
25#include "cffdecode.h"
26
27#ifndef T1_CONFIG_OPTION_NO_AFM
28#include "afmparse.h"
29#endif
30
31
34 {
35 ps_table_new, /* init */
36 ps_table_done, /* done */
37 ps_table_add, /* add */
38 ps_table_release /* release */
39 };
40
41
44 {
45 ps_parser_init, /* init */
46 ps_parser_done, /* done */
47
48 ps_parser_skip_spaces, /* skip_spaces */
49 ps_parser_skip_PS_token, /* skip_PS_token */
50
51 ps_parser_to_int, /* to_int */
52 ps_parser_to_fixed, /* to_fixed */
53 ps_parser_to_bytes, /* to_bytes */
54 ps_parser_to_coord_array, /* to_coord_array */
55 ps_parser_to_fixed_array, /* to_fixed_array */
56 ps_parser_to_token, /* to_token */
57 ps_parser_to_token_array, /* to_token_array */
58
59 ps_parser_load_field, /* load_field */
60 ps_parser_load_field_table /* load_field_table */
61 };
62
63
66 {
67 ps_builder_init, /* init */
68 ps_builder_done /* done */
69 };
70
71
74 {
75 t1_builder_init, /* init */
76 t1_builder_done, /* done */
77
78 t1_builder_check_points, /* check_points */
79 t1_builder_add_point, /* add_point */
80 t1_builder_add_point1, /* add_point1 */
81 t1_builder_add_contour, /* add_contour */
82 t1_builder_start_point, /* start_point */
83 t1_builder_close_contour /* close_contour */
84 };
85
86
89 {
90 t1_decoder_init, /* init */
91 t1_decoder_done, /* done */
92#ifdef T1_CONFIG_OPTION_OLD_ENGINE
93 t1_decoder_parse_charstrings, /* parse_charstrings_old */
94#else
95 t1_decoder_parse_metrics, /* parse_metrics */
96#endif
97 cf2_decoder_parse_charstrings /* parse_charstrings */
98 };
99
100
101#ifndef T1_CONFIG_OPTION_NO_AFM
104 {
105 afm_parser_init, /* init */
106 afm_parser_done, /* done */
107 afm_parser_parse /* parse */
108 };
109#endif
110
111
114 {
119 };
120
121
124 {
125 cff_builder_init, /* init */
126 cff_builder_done, /* done */
127
128 cff_check_points, /* check_points */
129 cff_builder_add_point, /* add_point */
130 cff_builder_add_point1, /* add_point1 */
131 cff_builder_add_contour, /* add_contour */
132 cff_builder_start_point, /* start_point */
133 cff_builder_close_contour /* close_contour */
134 };
135
136
139 {
140 cff_decoder_init, /* init */
141 cff_decoder_prepare, /* prepare */
142
143#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
144 cff_decoder_parse_charstrings, /* parse_charstrings_old */
145#endif
146 cf2_decoder_parse_charstrings /* parse_charstrings */
147 };
148
149
150 static
152 {
161
163
164#ifndef T1_CONFIG_OPTION_NO_AFM
166#else
167 0,
168#endif
169
171 };
172
173
176 {
177 0,
178 sizeof ( FT_ModuleRec ),
179 "psaux",
180 0x20000L,
181 0x20000L,
182
183 &psaux_interface, /* module-specific interface */
184
185 (FT_Module_Constructor)NULL, /* module_init */
186 (FT_Module_Destructor) NULL, /* module_done */
187 (FT_Module_Requester) NULL /* get_interface */
188 };
189
190
191/* END */
afm_parser_init(AFM_Parser parser, FT_Memory memory, FT_Byte *base, FT_Byte *limit)
Definition: afmparse.c:530
afm_parser_parse(AFM_Parser parser)
Definition: afmparse.c:862
afm_parser_done(AFM_Parser parser)
Definition: afmparse.c:558
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:2277
cff_decoder_prepare(CFF_Decoder *decoder, CFF_Size size, FT_UInt glyph_index)
Definition: cffdecode.c:2313
#define NULL
Definition: types.h:112
#define FT_CALLBACK_TABLE_DEF
Definition: ftconfig.h:553
void(* FT_Module_Destructor)(FT_Module module)
Definition: ftmodapi.h:167
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:184
struct FT_ModuleRec_ FT_ModuleRec
FT_CALLBACK_TABLE_DEF const CFF_Builder_FuncsRec cff_builder_funcs
Definition: psauxmod.c:123
FT_CALLBACK_TABLE_DEF const T1_Decoder_FuncsRec t1_decoder_funcs
Definition: psauxmod.c:88
FT_CALLBACK_TABLE_DEF const PS_Builder_FuncsRec ps_builder_funcs
Definition: psauxmod.c:65
FT_CALLBACK_TABLE_DEF const T1_CMap_ClassesRec t1_cmap_classes
Definition: psauxmod.c:113
FT_CALLBACK_TABLE_DEF const T1_Builder_FuncsRec t1_builder_funcs
Definition: psauxmod.c:73
FT_CALLBACK_TABLE_DEF const FT_Module_Class psaux_module_class
Definition: psauxmod.c:175
static const PSAux_Interface psaux_interface
Definition: psauxmod.c:151
FT_CALLBACK_TABLE_DEF const PS_Table_FuncsRec ps_table_funcs
Definition: psauxmod.c:33
FT_CALLBACK_TABLE_DEF const PS_Parser_FuncsRec ps_parser_funcs
Definition: psauxmod.c:43
FT_CALLBACK_TABLE_DEF const CFF_Decoder_FuncsRec cff_decoder_funcs
Definition: psauxmod.c:138
FT_CALLBACK_TABLE_DEF const AFM_Parser_FuncsRec afm_parser_funcs
Definition: psauxmod.c:103
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:1917
ps_parser_skip_PS_token(PS_Parser parser)
Definition: psobjs.c:510
t1_builder_close_contour(T1_Builder builder)
Definition: psobjs.c:1711
cff_builder_add_point(CFF_Builder *builder, FT_Pos x, FT_Pos y, FT_Byte flag)
Definition: psobjs.c:1879
ps_parser_to_fixed(PS_Parser parser, FT_Int power_ten)
Definition: psobjs.c:1433
ps_parser_to_token_array(PS_Parser parser, T1_Token tokens, FT_UInt max_tokens, FT_Int *pnum_tokens)
Definition: psobjs.c:721
ps_decoder_init(PS_Decoder *ps_decoder, void *decoder, FT_Bool is_t1)
Definition: psobjs.c:2357
ps_builder_init(PS_Builder *ps_builder, void *builder, FT_Bool is_t1)
Definition: psobjs.c:2057
ps_parser_init(PS_Parser parser, FT_Byte *base, FT_Byte *limit, FT_Memory memory)
Definition: psobjs.c:1483
t1_builder_start_point(T1_Builder builder, FT_Pos x, FT_Pos y)
Definition: psobjs.c:1686
t1_builder_init(T1_Builder builder, FT_Face face, FT_Size size, FT_GlyphSlot glyph, FT_Bool hinting)
Definition: psobjs.c:1533
ps_table_done(PS_Table table)
Definition: psobjs.c:236
t1_builder_add_point1(T1_Builder builder, FT_Pos x, FT_Pos y)
Definition: psobjs.c:1634
cff_check_points(CFF_Builder *builder, FT_Int count)
Definition: psobjs.c:1870
t1_builder_check_points(T1_Builder builder, FT_Int count)
Definition: psobjs.c:1601
ps_parser_to_coord_array(PS_Parser parser, FT_Int max_coords, FT_Short *coords)
Definition: psobjs.c:1442
ps_table_release(PS_Table table)
Definition: psobjs.c:260
ps_parser_load_field_table(PS_Parser parser, const T1_Field field, void **objects, FT_UInt max_objects, FT_ULong *pflags)
Definition: psobjs.c:1297
ps_parser_to_int(PS_Parser parser)
Definition: psobjs.c:1370
ps_parser_to_token(PS_Parser parser, T1_Token token)
Definition: psobjs.c:618
ps_parser_skip_spaces(PS_Parser parser)
Definition: psobjs.c:608
t1_builder_done(T1_Builder builder)
Definition: psobjs.c:1589
cff_builder_start_point(CFF_Builder *builder, FT_Pos x, FT_Pos y)
Definition: psobjs.c:1962
cff_random(FT_UInt32 r)
Definition: psobjs.c:2522
ps_parser_to_bytes(PS_Parser parser, FT_Byte *bytes, FT_Offset max_bytes, FT_ULong *pnum_bytes, FT_Bool delimiters)
Definition: psobjs.c:1380
ps_table_new(PS_Table table, FT_Int count, FT_Memory memory)
Definition: psobjs.c:71
t1_builder_add_point(T1_Builder builder, FT_Pos x, FT_Pos y, FT_Byte flag)
Definition: psobjs.c:1610
t1_decrypt(FT_Byte *buffer, FT_Offset length, FT_UShort seed)
Definition: psobjs.c:2509
t1_make_subfont(FT_Face face, PS_Private priv, CFF_SubFont subfont)
Definition: psobjs.c:2424
t1_builder_add_contour(T1_Builder builder)
Definition: psobjs.c:1651
ps_parser_done(PS_Parser parser)
Definition: psobjs.c:1498
ps_builder_done(PS_Builder *builder)
Definition: psobjs.c:2133
ps_table_add(PS_Table table, FT_Int idx, void *object, FT_UInt length)
Definition: psobjs.c:170
cff_builder_done(CFF_Builder *builder)
Definition: psobjs.c:1858
cff_builder_init(CFF_Builder *builder, TT_Face face, CFF_Size size, CFF_GlyphSlot glyph, FT_Bool hinting)
Definition: psobjs.c:1793
cff_builder_add_contour(CFF_Builder *builder)
Definition: psobjs.c:1934
ps_parser_to_fixed_array(PS_Parser parser, FT_Int max_values, FT_Fixed *values, FT_Int power_ten)
Definition: psobjs.c:1453
cff_builder_close_contour(CFF_Builder *builder)
Definition: psobjs.c:1984
ps_parser_load_field(PS_Parser parser, const T1_Field field, void **objects, FT_UInt max_objects, FT_ULong *pflags)
Definition: psobjs.c:1025
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:354
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:1662
t1_decoder_done(T1_Decoder decoder)
Definition: t1decode.c:1973
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:1925