Hash :
0589e3c0
Author :
Date :
2017-09-25T06:10:20
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187
/***************************************************************************/
/* */
/* psauxmod.c */
/* */
/* FreeType auxiliary PostScript module implementation (body). */
/* */
/* Copyright 2000-2017 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. */
/* */
/***************************************************************************/
#include <ft2build.h>
#include "psauxmod.h"
#include "psobjs.h"
#include "t1decode.h"
#include "t1cmap.h"
#include "psft.h"
#include "cffdecode.h"
#ifndef T1_CONFIG_OPTION_NO_AFM
#include "afmparse.h"
#endif
FT_CALLBACK_TABLE_DEF
const PS_Table_FuncsRec ps_table_funcs =
{
ps_table_new, /* init */
ps_table_done, /* done */
ps_table_add, /* add */
ps_table_release /* release */
};
FT_CALLBACK_TABLE_DEF
const PS_Parser_FuncsRec ps_parser_funcs =
{
ps_parser_init, /* init */
ps_parser_done, /* done */
ps_parser_skip_spaces, /* skip_spaces */
ps_parser_skip_PS_token, /* skip_PS_token */
ps_parser_to_int, /* to_int */
ps_parser_to_fixed, /* to_fixed */
ps_parser_to_bytes, /* to_bytes */
ps_parser_to_coord_array, /* to_coord_array */
ps_parser_to_fixed_array, /* to_fixed_array */
ps_parser_to_token, /* to_token */
ps_parser_to_token_array, /* to_token_array */
ps_parser_load_field, /* load_field */
ps_parser_load_field_table /* load_field_table */
};
FT_CALLBACK_TABLE_DEF
const PS_Builder_FuncsRec ps_builder_funcs =
{
ps_builder_init, /* init */
ps_builder_done /* done */
};
FT_CALLBACK_TABLE_DEF
const T1_Builder_FuncsRec t1_builder_funcs =
{
t1_builder_init, /* init */
t1_builder_done, /* done */
t1_builder_check_points, /* check_points */
t1_builder_add_point, /* add_point */
t1_builder_add_point1, /* add_point1 */
t1_builder_add_contour, /* add_contour */
t1_builder_start_point, /* start_point */
t1_builder_close_contour /* close_contour */
};
FT_CALLBACK_TABLE_DEF
const T1_Decoder_FuncsRec t1_decoder_funcs =
{
t1_decoder_init, /* init */
t1_decoder_done, /* done */
t1_decoder_parse_charstrings, /* parse_charstrings_old */
cf2_decoder_parse_charstrings /* parse_charstrings */
};
#ifndef T1_CONFIG_OPTION_NO_AFM
FT_CALLBACK_TABLE_DEF
const AFM_Parser_FuncsRec afm_parser_funcs =
{
afm_parser_init, /* init */
afm_parser_done, /* done */
afm_parser_parse /* parse */
};
#endif
FT_CALLBACK_TABLE_DEF
const T1_CMap_ClassesRec t1_cmap_classes =
{
&t1_cmap_standard_class_rec,
&t1_cmap_expert_class_rec,
&t1_cmap_custom_class_rec,
&t1_cmap_unicode_class_rec
};
FT_CALLBACK_TABLE_DEF
const CFF_Builder_FuncsRec cff_builder_funcs =
{
cff_builder_init, /* init */
cff_builder_done, /* done */
cff_check_points, /* check_points */
cff_builder_add_point, /* add_point */
cff_builder_add_point1, /* add_point1 */
cff_builder_add_contour, /* add_contour */
cff_builder_start_point, /* start_point */
cff_builder_close_contour /* close_contour */
};
FT_CALLBACK_TABLE_DEF
const CFF_Decoder_FuncsRec cff_decoder_funcs =
{
cff_decoder_init, /* init */
cff_decoder_prepare, /* prepare */
#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
cff_decoder_parse_charstrings, /* parse_charstrings_old */
#endif
cf2_decoder_parse_charstrings /* parse_charstrings */
};
static
const PSAux_Interface psaux_interface =
{
&ps_table_funcs,
&ps_parser_funcs,
&t1_builder_funcs,
&t1_decoder_funcs,
t1_decrypt,
cff_random,
ps_decoder_init,
t1_make_subfont,
(const T1_CMap_ClassesRec*) &t1_cmap_classes,
#ifndef T1_CONFIG_OPTION_NO_AFM
&afm_parser_funcs,
#else
0,
#endif
&cff_decoder_funcs,
};
FT_CALLBACK_TABLE_DEF
const FT_Module_Class psaux_module_class =
{
0,
sizeof ( FT_ModuleRec ),
"psaux",
0x20000L,
0x20000L,
&psaux_interface, /* module-specific interface */
(FT_Module_Constructor)NULL, /* module_init */
(FT_Module_Destructor) NULL, /* module_done */
(FT_Module_Requester) NULL /* get_interface */
};
/* END */