psobjs.h 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. /***************************************************************************/
  2. /* */
  3. /* psobjs.h */
  4. /* */
  5. /* Auxiliary functions for PostScript fonts (specification). */
  6. /* */
  7. /* Copyright 1996-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. #ifndef __PSOBJS_H__
  18. #define __PSOBJS_H__
  19. #include <ft2build.h>
  20. #include FT_INTERNAL_POSTSCRIPT_AUX_H
  21. FT_BEGIN_HEADER
  22. /*************************************************************************/
  23. /*************************************************************************/
  24. /***** *****/
  25. /***** T1_TABLE *****/
  26. /***** *****/
  27. /*************************************************************************/
  28. /*************************************************************************/
  29. FT_CALLBACK_TABLE
  30. const PS_Table_FuncsRec ps_table_funcs;
  31. FT_CALLBACK_TABLE
  32. const PS_Parser_FuncsRec ps_parser_funcs;
  33. FT_CALLBACK_TABLE
  34. const T1_Builder_FuncsRec t1_builder_funcs;
  35. FT_LOCAL( FT_Error )
  36. ps_table_new( PS_Table table,
  37. FT_Int count,
  38. FT_Memory memory );
  39. FT_LOCAL( FT_Error )
  40. ps_table_add( PS_Table table,
  41. FT_Int idx,
  42. void* object,
  43. FT_Int length );
  44. FT_LOCAL( void )
  45. ps_table_done( PS_Table table );
  46. FT_LOCAL( void )
  47. ps_table_release( PS_Table table );
  48. /*************************************************************************/
  49. /*************************************************************************/
  50. /***** *****/
  51. /***** T1 PARSER *****/
  52. /***** *****/
  53. /*************************************************************************/
  54. /*************************************************************************/
  55. FT_LOCAL( void )
  56. ps_parser_skip_spaces( PS_Parser parser );
  57. FT_LOCAL( void )
  58. ps_parser_skip_alpha( PS_Parser parser );
  59. FT_LOCAL( void )
  60. ps_parser_to_token( PS_Parser parser,
  61. T1_Token token );
  62. FT_LOCAL( void )
  63. ps_parser_to_token_array( PS_Parser parser,
  64. T1_Token tokens,
  65. FT_UInt max_tokens,
  66. FT_Int* pnum_tokens );
  67. FT_LOCAL( FT_Error )
  68. ps_parser_load_field( PS_Parser parser,
  69. const T1_Field field,
  70. void** objects,
  71. FT_UInt max_objects,
  72. FT_ULong* pflags );
  73. FT_LOCAL( FT_Error )
  74. ps_parser_load_field_table( PS_Parser parser,
  75. const T1_Field field,
  76. void** objects,
  77. FT_UInt max_objects,
  78. FT_ULong* pflags );
  79. FT_LOCAL( FT_Long )
  80. ps_parser_to_int( PS_Parser parser );
  81. FT_LOCAL( FT_Fixed )
  82. ps_parser_to_fixed( PS_Parser parser,
  83. FT_Int power_ten );
  84. FT_LOCAL( FT_Int )
  85. ps_parser_to_coord_array( PS_Parser parser,
  86. FT_Int max_coords,
  87. FT_Short* coords );
  88. FT_LOCAL( FT_Int )
  89. ps_parser_to_fixed_array( PS_Parser parser,
  90. FT_Int max_values,
  91. FT_Fixed* values,
  92. FT_Int power_ten );
  93. FT_LOCAL( void )
  94. ps_parser_init( PS_Parser parser,
  95. FT_Byte* base,
  96. FT_Byte* limit,
  97. FT_Memory memory );
  98. FT_LOCAL( void )
  99. ps_parser_done( PS_Parser parser );
  100. /*************************************************************************/
  101. /*************************************************************************/
  102. /***** *****/
  103. /***** T1 BUILDER *****/
  104. /***** *****/
  105. /*************************************************************************/
  106. /*************************************************************************/
  107. FT_LOCAL( void )
  108. t1_builder_init( T1_Builder builder,
  109. FT_Face face,
  110. FT_Size size,
  111. FT_GlyphSlot glyph,
  112. FT_Bool hinting );
  113. FT_LOCAL( void )
  114. t1_builder_done( T1_Builder builder );
  115. FT_LOCAL( FT_Error )
  116. t1_builder_check_points( T1_Builder builder,
  117. FT_Int count );
  118. FT_LOCAL( void )
  119. t1_builder_add_point( T1_Builder builder,
  120. FT_Pos x,
  121. FT_Pos y,
  122. FT_Byte flag );
  123. FT_LOCAL( FT_Error )
  124. t1_builder_add_point1( T1_Builder builder,
  125. FT_Pos x,
  126. FT_Pos y );
  127. FT_LOCAL( FT_Error )
  128. t1_builder_add_contour( T1_Builder builder );
  129. FT_LOCAL( FT_Error )
  130. t1_builder_start_point( T1_Builder builder,
  131. FT_Pos x,
  132. FT_Pos y );
  133. FT_LOCAL( void )
  134. t1_builder_close_contour( T1_Builder builder );
  135. /*************************************************************************/
  136. /*************************************************************************/
  137. /***** *****/
  138. /***** OTHER *****/
  139. /***** *****/
  140. /*************************************************************************/
  141. /*************************************************************************/
  142. FT_LOCAL( void )
  143. t1_decrypt( FT_Byte* buffer,
  144. FT_Offset length,
  145. FT_UShort seed );
  146. FT_END_HEADER
  147. #endif /* __PSOBJS_H__ */
  148. /* END */