michael@0: /* michael@0: * Copyright 2012 Google Inc. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: #ifndef SkOTTable_OS_2_DEFINED michael@0: #define SkOTTable_OS_2_DEFINED michael@0: michael@0: #include "SkOTTable_OS_2_VA.h" michael@0: #include "SkOTTable_OS_2_V0.h" michael@0: #include "SkOTTable_OS_2_V1.h" michael@0: #include "SkOTTable_OS_2_V2.h" michael@0: #include "SkOTTable_OS_2_V3.h" michael@0: #include "SkOTTable_OS_2_V4.h" michael@0: michael@0: #pragma pack(push, 1) michael@0: michael@0: struct SkOTTableOS2 { michael@0: static const SK_OT_CHAR TAG0 = 'O'; michael@0: static const SK_OT_CHAR TAG1 = 'S'; michael@0: static const SK_OT_CHAR TAG2 = '/'; michael@0: static const SK_OT_CHAR TAG3 = '2'; michael@0: static const SK_OT_ULONG TAG = SkOTTableTAG::value; michael@0: michael@0: union Version { michael@0: SK_OT_USHORT version; michael@0: michael@0: //original V0 TT michael@0: struct VA : SkOTTableOS2_VA { } vA; michael@0: struct V0 : SkOTTableOS2_V0 { } v0; michael@0: struct V1 : SkOTTableOS2_V1 { } v1; michael@0: struct V2 : SkOTTableOS2_V2 { } v2; michael@0: //makes fsType 0-3 exclusive michael@0: struct V3 : SkOTTableOS2_V3 { } v3; michael@0: //defines fsSelection bits 7-9 michael@0: struct V4 : SkOTTableOS2_V4 { } v4; michael@0: } version; michael@0: }; michael@0: michael@0: #pragma pack(pop) michael@0: michael@0: michael@0: SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::VA) == 68, sizeof_SkOTTableOS2__VA_not_68); michael@0: SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V0) == 78, sizeof_SkOTTableOS2__V0_not_78); michael@0: SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V1) == 86, sizeof_SkOTTableOS2__V1_not_86); michael@0: SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V2) == 96, sizeof_SkOTTableOS2__V2_not_96); michael@0: SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V3) == 96, sizeof_SkOTTableOS2__V3_not_96); michael@0: SK_COMPILE_ASSERT(sizeof(SkOTTableOS2::Version::V4) == 96, sizeof_SkOTTableOS2__V4_not_96); michael@0: michael@0: #endif