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_post_DEFINED michael@0: #define SkOTTable_post_DEFINED michael@0: michael@0: #include "SkEndian.h" michael@0: #include "SkOTTableTypes.h" michael@0: #include "SkTypedEnum.h" michael@0: michael@0: #pragma pack(push, 1) michael@0: michael@0: struct SkOTTablePostScript { michael@0: static const SK_OT_CHAR TAG0 = 'p'; michael@0: static const SK_OT_CHAR TAG1 = 'o'; michael@0: static const SK_OT_CHAR TAG2 = 's'; michael@0: static const SK_OT_CHAR TAG3 = 't'; michael@0: static const SK_OT_ULONG TAG = SkOTTableTAG::value; michael@0: michael@0: struct Format { michael@0: SK_TYPED_ENUM(Value, SK_OT_Fixed, michael@0: ((version1, SkTEndian_SwapBE32(0x00010000))) michael@0: ((version2, SkTEndian_SwapBE32(0x00020000))) michael@0: ((version2_5, SkTEndian_SwapBE32(0x00025000))) michael@0: ((version3, SkTEndian_SwapBE32(0x00030000))) michael@0: ((version4, SkTEndian_SwapBE32(0x00040000))) michael@0: SK_SEQ_END, michael@0: SK_SEQ_END) michael@0: SK_OT_Fixed value; michael@0: } format; michael@0: SK_OT_Fixed italicAngle; michael@0: SK_OT_FWORD underlinePosition; michael@0: SK_OT_FWORD underlineThickness; michael@0: SK_OT_ULONG isFixedPitch; michael@0: SK_OT_ULONG minMemType42; michael@0: SK_OT_ULONG maxMemType42; michael@0: SK_OT_ULONG minMemType1; michael@0: SK_OT_ULONG maxMemType1; michael@0: }; michael@0: michael@0: #pragma pack(pop) michael@0: michael@0: michael@0: #include michael@0: SK_COMPILE_ASSERT(offsetof(SkOTTablePostScript, maxMemType1) == 28, SkOTTablePostScript_maxMemType1_not_at_28); michael@0: SK_COMPILE_ASSERT(sizeof(SkOTTablePostScript) == 32, sizeof_SkOTTablePostScript_not_32); michael@0: michael@0: #endif