/src/compiler/android-ndk/jni/freetype/src/psaux/afmparse.h

http://ftk.googlecode.com/ · C++ Header · 87 lines · 44 code · 25 blank · 18 comment · 0 complexity · fe7767842fd05b8cbc69a238e47fef39 MD5 · raw file

  1. /***************************************************************************/
  2. /* */
  3. /* afmparse.h */
  4. /* */
  5. /* AFM parser (specification). */
  6. /* */
  7. /* Copyright 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. #ifndef __AFMPARSE_H__
  18. #define __AFMPARSE_H__
  19. #include <ft2build.h>
  20. #include FT_INTERNAL_POSTSCRIPT_AUX_H
  21. FT_BEGIN_HEADER
  22. FT_LOCAL( FT_Error )
  23. afm_parser_init( AFM_Parser parser,
  24. FT_Memory memory,
  25. FT_Byte* base,
  26. FT_Byte* limit );
  27. FT_LOCAL( void )
  28. afm_parser_done( AFM_Parser parser );
  29. FT_LOCAL( FT_Error )
  30. afm_parser_parse( AFM_Parser parser );
  31. enum AFM_ValueType_
  32. {
  33. AFM_VALUE_TYPE_STRING,
  34. AFM_VALUE_TYPE_NAME,
  35. AFM_VALUE_TYPE_FIXED, /* real number */
  36. AFM_VALUE_TYPE_INTEGER,
  37. AFM_VALUE_TYPE_BOOL,
  38. AFM_VALUE_TYPE_INDEX /* glyph index */
  39. };
  40. typedef struct AFM_ValueRec_
  41. {
  42. enum AFM_ValueType_ type;
  43. union {
  44. char* s;
  45. FT_Fixed f;
  46. FT_Int i;
  47. FT_Bool b;
  48. } u;
  49. } AFM_ValueRec, *AFM_Value;
  50. #define AFM_MAX_ARGUMENTS 5
  51. FT_LOCAL( FT_Int )
  52. afm_parser_read_vals( AFM_Parser parser,
  53. AFM_Value vals,
  54. FT_UInt n );
  55. /* read the next key from the next line or column */
  56. FT_LOCAL( char* )
  57. afm_parser_next_key( AFM_Parser parser,
  58. FT_Bool line,
  59. FT_Offset* len );
  60. FT_END_HEADER
  61. #endif /* __AFMPARSE_H__ */
  62. /* END */