t42parse.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /***************************************************************************/
  2. /* */
  3. /* t42parse.h */
  4. /* */
  5. /* Type 42 font parser (specification). */
  6. /* */
  7. /* Copyright 2002 by Roberto Alameda. */
  8. /* */
  9. /* This file is part of the FreeType project, and may only be used, */
  10. /* modified, and distributed under the terms of the FreeType project */
  11. /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
  12. /* this file you indicate that you have read the license and */
  13. /* understand and accept it fully. */
  14. /* */
  15. /***************************************************************************/
  16. #ifndef __T42PARSE_H__
  17. #define __T42PARSE_H__
  18. #include "t42objs.h"
  19. #include FT_INTERNAL_POSTSCRIPT_AUX_H
  20. FT_BEGIN_HEADER
  21. typedef struct T42_ParserRec_
  22. {
  23. PS_ParserRec root;
  24. FT_Stream stream;
  25. FT_Byte* base_dict;
  26. FT_Int base_len;
  27. FT_Byte in_memory;
  28. } T42_ParserRec, *T42_Parser;
  29. typedef struct T42_Loader_
  30. {
  31. T42_ParserRec parser; /* parser used to read the stream */
  32. FT_Int num_chars; /* number of characters in encoding */
  33. PS_TableRec encoding_table; /* PS_Table used to store the */
  34. /* encoding character names */
  35. FT_Int num_glyphs;
  36. PS_TableRec glyph_names;
  37. PS_TableRec charstrings;
  38. } T42_LoaderRec, *T42_Loader;
  39. FT_LOCAL( FT_Error )
  40. t42_parser_init( T42_Parser parser,
  41. FT_Stream stream,
  42. FT_Memory memory,
  43. PSAux_Service psaux );
  44. FT_LOCAL( void )
  45. t42_parser_done( T42_Parser parser );
  46. FT_LOCAL( FT_Error )
  47. t42_parse_dict( T42_Face face,
  48. T42_Loader loader,
  49. FT_Byte* base,
  50. FT_Long size );
  51. FT_LOCAL( void )
  52. t42_loader_init( T42_Loader loader,
  53. T42_Face face );
  54. FT_LOCAL( void )
  55. t42_loader_done( T42_Loader loader );
  56. /* */
  57. FT_END_HEADER
  58. #endif /* __T42PARSE_H__ */
  59. /* END */