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 8 #ifndef SkOTTable_post_DEFINED 9 #define SkOTTable_post_DEFINED 10 11 #include "SkEndian.h" 12 #include "SkOTTableTypes.h" 13 #include "SkTypedEnum.h" 14 15 #pragma pack(push, 1) 16 17 struct SkOTTablePostScript { 18 static const SK_OT_CHAR TAG0 = 'p'; 19 static const SK_OT_CHAR TAG1 = 'o'; 20 static const SK_OT_CHAR TAG2 = 's'; 21 static const SK_OT_CHAR TAG3 = 't'; 22 static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTablePostScript>::value; 23 24 struct Format { 25 SK_TYPED_ENUM(Value, SK_OT_Fixed, 26 ((version1, SkTEndian_SwapBE32(0x00010000))) 27 ((version2, SkTEndian_SwapBE32(0x00020000))) 28 ((version2_5, SkTEndian_SwapBE32(0x00025000))) 29 ((version3, SkTEndian_SwapBE32(0x00030000))) 30 ((version4, SkTEndian_SwapBE32(0x00040000))) 31 SK_SEQ_END, 32 SK_SEQ_END) 33 SK_OT_Fixed value; 34 } format; 35 SK_OT_Fixed italicAngle; 36 SK_OT_FWORD underlinePosition; 37 SK_OT_FWORD underlineThickness; 38 SK_OT_ULONG isFixedPitch; 39 SK_OT_ULONG minMemType42; 40 SK_OT_ULONG maxMemType42; 41 SK_OT_ULONG minMemType1; 42 SK_OT_ULONG maxMemType1; 43 }; 44 45 #pragma pack(pop) 46 47 48 #include <stddef.h> 49 SK_COMPILE_ASSERT(offsetof(SkOTTablePostScript, maxMemType1) == 28, SkOTTablePostScript_maxMemType1_not_at_28); 50 SK_COMPILE_ASSERT(sizeof(SkOTTablePostScript) == 32, sizeof_SkOTTablePostScript_not_32); 51 52 #endif 53