ulayout_props.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // © 2019 and later: Unicode, Inc. and others.
  2. // License & terms of use: http://www.unicode.org/copyright.html
  3. // ulayout_props.h
  4. // created: 2019feb12 Markus W. Scherer
  5. #ifndef __ULAYOUT_PROPS_H__
  6. #define __ULAYOUT_PROPS_H__
  7. #include "unicode/utypes.h"
  8. // file definitions ------------------------------------------------------------
  9. #define ULAYOUT_DATA_NAME "ulayout"
  10. #define ULAYOUT_DATA_TYPE "icu"
  11. // data format "Layo"
  12. #define ULAYOUT_FMT_0 0x4c
  13. #define ULAYOUT_FMT_1 0x61
  14. #define ULAYOUT_FMT_2 0x79
  15. #define ULAYOUT_FMT_3 0x6f
  16. // indexes into indexes[]
  17. enum {
  18. // Element 0 stores the length of the indexes[] array.
  19. ULAYOUT_IX_INDEXES_LENGTH,
  20. // Elements 1..7 store the tops of consecutive code point tries.
  21. // No trie is stored if the difference between two of these is less than 16.
  22. ULAYOUT_IX_INPC_TRIE_TOP,
  23. ULAYOUT_IX_INSC_TRIE_TOP,
  24. ULAYOUT_IX_VO_TRIE_TOP,
  25. ULAYOUT_IX_RESERVED_TOP,
  26. ULAYOUT_IX_TRIES_TOP = 7,
  27. ULAYOUT_IX_MAX_VALUES = 9,
  28. // Length of indexes[]. Multiple of 4 to 16-align the tries.
  29. ULAYOUT_IX_COUNT = 12
  30. };
  31. constexpr int32_t ULAYOUT_MAX_INPC_SHIFT = 24;
  32. constexpr int32_t ULAYOUT_MAX_INSC_SHIFT = 16;
  33. constexpr int32_t ULAYOUT_MAX_VO_SHIFT = 8;
  34. #endif // __ULAYOUT_PROPS_H__