otltable.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #ifndef __OTL_TABLE_H__
  2. #define __OTL_TABLE_H__
  3. #include "otlayout.h"
  4. OTL_BEGIN_HEADER
  5. typedef struct OTL_TableRec_* OTL_Table;
  6. typedef enum
  7. {
  8. OTL_TABLE_TYPE_GDEF = 1,
  9. OTL_TABLE_TYPE_GSUB,
  10. OTL_TABLE_TYPE_GPOS,
  11. OTL_TABLE_TYPE_BASE,
  12. OTL_TABLE_TYPE_JSTF
  13. } OTL_TableType;
  14. /* this may become a private structure later */
  15. typedef struct OTL_TableRec_
  16. {
  17. OTL_TableType type;
  18. OTL_Bytes base;
  19. OTL_Bytes limit;
  20. OTL_Tag script_tag;
  21. OTL_Tag lang_tag;
  22. OTL_UInt lookup_count;
  23. OTL_Byte* lookup_flags;
  24. OTL_UInt feature_count;
  25. OTL_Tag feature_tags;
  26. OTL_Byte* feature_flags;
  27. } OTL_TableRec;
  28. OTL_API( OTL_Error )
  29. otl_table_validate( OTL_Bytes table,
  30. OTL_Size size,
  31. OTL_TableType type,
  32. OTL_Size *abyte_size );
  33. OTL_API( void )
  34. otl_table_init( OTL_Table table,
  35. OTL_TableType type,
  36. OTL_Bytes base,
  37. OTL_Size size );
  38. OTL_API( void )
  39. otl_table_set_script( OTL_Table table,
  40. OTL_ScriptTag script,
  41. OTL_LangTag language );
  42. OTL_END_HEADER
  43. #endif /* __OTL_TABLE_H__ */