SkOTTable_maxp_TT.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright 2012 Google Inc.
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. #ifndef SkOTTable_maxp_TT_DEFINED
  8. #define SkOTTable_maxp_TT_DEFINED
  9. #include "src/core/SkEndian.h"
  10. #include "src/sfnt/SkOTTableTypes.h"
  11. #pragma pack(push, 1)
  12. struct SkOTTableMaximumProfile_TT {
  13. SK_OT_Fixed version;
  14. static const SK_OT_Fixed VERSION = SkTEndian_SwapBE32(0x00010000);
  15. SK_OT_USHORT numGlyphs;
  16. SK_OT_USHORT maxPoints;
  17. SK_OT_USHORT maxContours;
  18. SK_OT_USHORT maxCompositePoints;
  19. SK_OT_USHORT maxCompositeContours;
  20. struct MaxZones {
  21. enum Value : SK_OT_USHORT {
  22. DoesNotUseTwilightZone = SkTEndian_SwapBE16(1),
  23. UsesTwilightZone = SkTEndian_SwapBE16(2),
  24. } value;
  25. } maxZones;
  26. SK_OT_USHORT maxTwilightPoints;
  27. SK_OT_USHORT maxStorage;
  28. SK_OT_USHORT maxFunctionDefs;
  29. SK_OT_USHORT maxInstructionDefs;
  30. SK_OT_USHORT maxStackElements;
  31. SK_OT_USHORT maxSizeOfInstructions;
  32. SK_OT_USHORT maxComponentElements;
  33. SK_OT_USHORT maxComponentDepth;
  34. };
  35. #pragma pack(pop)
  36. #include <stddef.h>
  37. static_assert(offsetof(SkOTTableMaximumProfile_TT, maxComponentDepth) == 30, "SkOTTableMaximumProfile_TT_maxComponentDepth_not_at_30");
  38. static_assert(sizeof(SkOTTableMaximumProfile_TT) == 32, "sizeof_SkOTTableMaximumProfile_TT_not_32");
  39. #endif