psauxmod.c 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /***************************************************************************/
  2. /* */
  3. /* psauxmod.c */
  4. /* */
  5. /* FreeType auxiliary PostScript module implementation (body). */
  6. /* */
  7. /* Copyright 2000-2001, 2002 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. #include <ft2build.h>
  18. #include "psauxmod.h"
  19. #include "psobjs.h"
  20. #include "t1decode.h"
  21. #include "t1cmap.h"
  22. FT_CALLBACK_TABLE_DEF
  23. const PS_Table_FuncsRec ps_table_funcs =
  24. {
  25. ps_table_new,
  26. ps_table_done,
  27. ps_table_add,
  28. ps_table_release
  29. };
  30. FT_CALLBACK_TABLE_DEF
  31. const PS_Parser_FuncsRec ps_parser_funcs =
  32. {
  33. ps_parser_init,
  34. ps_parser_done,
  35. ps_parser_skip_spaces,
  36. ps_parser_skip_alpha,
  37. ps_parser_to_int,
  38. ps_parser_to_fixed,
  39. ps_parser_to_coord_array,
  40. ps_parser_to_fixed_array,
  41. ps_parser_to_token,
  42. ps_parser_to_token_array,
  43. ps_parser_load_field,
  44. ps_parser_load_field_table
  45. };
  46. FT_CALLBACK_TABLE_DEF
  47. const T1_Builder_FuncsRec t1_builder_funcs =
  48. {
  49. t1_builder_init,
  50. t1_builder_done,
  51. t1_builder_check_points,
  52. t1_builder_add_point,
  53. t1_builder_add_point1,
  54. t1_builder_add_contour,
  55. t1_builder_start_point,
  56. t1_builder_close_contour
  57. };
  58. FT_CALLBACK_TABLE_DEF
  59. const T1_Decoder_FuncsRec t1_decoder_funcs =
  60. {
  61. t1_decoder_init,
  62. t1_decoder_done,
  63. t1_decoder_parse_charstrings
  64. };
  65. FT_CALLBACK_TABLE_DEF
  66. const T1_CMap_ClassesRec t1_cmap_classes =
  67. {
  68. &t1_cmap_standard_class_rec,
  69. &t1_cmap_expert_class_rec,
  70. &t1_cmap_custom_class_rec,
  71. &t1_cmap_unicode_class_rec
  72. };
  73. static
  74. const PSAux_Interface psaux_interface =
  75. {
  76. &ps_table_funcs,
  77. &ps_parser_funcs,
  78. &t1_builder_funcs,
  79. &t1_decoder_funcs,
  80. t1_decrypt,
  81. (const T1_CMap_ClassesRec*) &t1_cmap_classes,
  82. };
  83. FT_CALLBACK_TABLE_DEF
  84. const FT_Module_Class psaux_module_class =
  85. {
  86. 0,
  87. sizeof( FT_ModuleRec ),
  88. "psaux",
  89. 0x10000L,
  90. 0x20000L,
  91. &psaux_interface, /* module-specific interface */
  92. (FT_Module_Constructor)0,
  93. (FT_Module_Destructor) 0,
  94. (FT_Module_Requester) 0
  95. };
  96. /* END */