cffparse.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /***************************************************************************/
  2. /* */
  3. /* cffparse.h */
  4. /* */
  5. /* CFF token stream parser (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 __CFF_PARSE_H__
  18. #define __CFF_PARSE_H__
  19. #include <ft2build.h>
  20. #include FT_INTERNAL_CFF_TYPES_H
  21. #include FT_INTERNAL_OBJECTS_H
  22. FT_BEGIN_HEADER
  23. #define CFF_MAX_STACK_DEPTH 96
  24. #define CFF_CODE_TOPDICT 0x1000
  25. #define CFF_CODE_PRIVATE 0x2000
  26. typedef struct CFF_ParserRec_
  27. {
  28. FT_Byte* start;
  29. FT_Byte* limit;
  30. FT_Byte* cursor;
  31. FT_Byte* stack[CFF_MAX_STACK_DEPTH + 1];
  32. FT_Byte** top;
  33. FT_UInt object_code;
  34. void* object;
  35. } CFF_ParserRec, *CFF_Parser;
  36. FT_LOCAL( void )
  37. cff_parser_init( CFF_Parser parser,
  38. FT_UInt code,
  39. void* object );
  40. FT_LOCAL( FT_Error )
  41. cff_parser_run( CFF_Parser parser,
  42. FT_Byte* start,
  43. FT_Byte* limit );
  44. FT_END_HEADER
  45. #endif /* __CFF_PARSE_H__ */
  46. /* END */