/modules/freetype2/src/psaux/psauxmod.c

http://github.com/zpao/v8monkey · C · 139 lines · 97 code · 25 blank · 17 comment · 0 complexity · dee35a638c6d03b58fc08cb87a0cc789 MD5 · raw file

  1. /***************************************************************************/
  2. /* */
  3. /* psauxmod.c */
  4. /* */
  5. /* FreeType auxiliary PostScript module implementation (body). */
  6. /* */
  7. /* Copyright 2000-2001, 2002, 2003, 2006 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. #ifndef T1_CONFIG_OPTION_NO_AFM
  23. #include "afmparse.h"
  24. #endif
  25. FT_CALLBACK_TABLE_DEF
  26. const PS_Table_FuncsRec ps_table_funcs =
  27. {
  28. ps_table_new,
  29. ps_table_done,
  30. ps_table_add,
  31. ps_table_release
  32. };
  33. FT_CALLBACK_TABLE_DEF
  34. const PS_Parser_FuncsRec ps_parser_funcs =
  35. {
  36. ps_parser_init,
  37. ps_parser_done,
  38. ps_parser_skip_spaces,
  39. ps_parser_skip_PS_token,
  40. ps_parser_to_int,
  41. ps_parser_to_fixed,
  42. ps_parser_to_bytes,
  43. ps_parser_to_coord_array,
  44. ps_parser_to_fixed_array,
  45. ps_parser_to_token,
  46. ps_parser_to_token_array,
  47. ps_parser_load_field,
  48. ps_parser_load_field_table
  49. };
  50. FT_CALLBACK_TABLE_DEF
  51. const T1_Builder_FuncsRec t1_builder_funcs =
  52. {
  53. t1_builder_init,
  54. t1_builder_done,
  55. t1_builder_check_points,
  56. t1_builder_add_point,
  57. t1_builder_add_point1,
  58. t1_builder_add_contour,
  59. t1_builder_start_point,
  60. t1_builder_close_contour
  61. };
  62. FT_CALLBACK_TABLE_DEF
  63. const T1_Decoder_FuncsRec t1_decoder_funcs =
  64. {
  65. t1_decoder_init,
  66. t1_decoder_done,
  67. t1_decoder_parse_charstrings
  68. };
  69. #ifndef T1_CONFIG_OPTION_NO_AFM
  70. FT_CALLBACK_TABLE_DEF
  71. const AFM_Parser_FuncsRec afm_parser_funcs =
  72. {
  73. afm_parser_init,
  74. afm_parser_done,
  75. afm_parser_parse
  76. };
  77. #endif
  78. FT_CALLBACK_TABLE_DEF
  79. const T1_CMap_ClassesRec t1_cmap_classes =
  80. {
  81. &t1_cmap_standard_class_rec,
  82. &t1_cmap_expert_class_rec,
  83. &t1_cmap_custom_class_rec,
  84. &t1_cmap_unicode_class_rec
  85. };
  86. static
  87. const PSAux_Interface psaux_interface =
  88. {
  89. &ps_table_funcs,
  90. &ps_parser_funcs,
  91. &t1_builder_funcs,
  92. &t1_decoder_funcs,
  93. t1_decrypt,
  94. (const T1_CMap_ClassesRec*) &t1_cmap_classes,
  95. #ifndef T1_CONFIG_OPTION_NO_AFM
  96. &afm_parser_funcs,
  97. #else
  98. 0,
  99. #endif
  100. };
  101. FT_CALLBACK_TABLE_DEF
  102. const FT_Module_Class psaux_module_class =
  103. {
  104. 0,
  105. sizeof( FT_ModuleRec ),
  106. "psaux",
  107. 0x20000L,
  108. 0x20000L,
  109. &psaux_interface, /* module-specific interface */
  110. (FT_Module_Constructor)0,
  111. (FT_Module_Destructor) 0,
  112. (FT_Module_Requester) 0
  113. };
  114. /* END */