/src/freetype/src/type42/t42parse.h

https://bitbucket.org/cabalistic/ogredeps/ · C++ Header · 90 lines · 42 code · 30 blank · 18 comment · 0 complexity · db886890bcf22da58d6f43f3420efb4b MD5 · raw file

  1. /***************************************************************************/
  2. /* */
  3. /* t42parse.h */
  4. /* */
  5. /* Type 42 font parser (specification). */
  6. /* */
  7. /* Copyright 2002, 2003 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_Long base_len;
  27. FT_Bool 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_UInt num_chars; /* number of characters in encoding */
  33. PS_TableRec encoding_table; /* PS_Table used to store the */
  34. /* encoding character names */
  35. FT_UInt num_glyphs;
  36. PS_TableRec glyph_names;
  37. PS_TableRec charstrings;
  38. PS_TableRec swap_table; /* For moving .notdef glyph to index 0. */
  39. } T42_LoaderRec, *T42_Loader;
  40. FT_LOCAL( FT_Error )
  41. t42_parser_init( T42_Parser parser,
  42. FT_Stream stream,
  43. FT_Memory memory,
  44. PSAux_Service psaux );
  45. FT_LOCAL( void )
  46. t42_parser_done( T42_Parser parser );
  47. FT_LOCAL( FT_Error )
  48. t42_parse_dict( T42_Face face,
  49. T42_Loader loader,
  50. FT_Byte* base,
  51. FT_Long size );
  52. FT_LOCAL( void )
  53. t42_loader_init( T42_Loader loader,
  54. T42_Face face );
  55. FT_LOCAL( void )
  56. t42_loader_done( T42_Loader loader );
  57. /* */
  58. FT_END_HEADER
  59. #endif /* __T42PARSE_H__ */
  60. /* END */