1f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com/* 2f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com * Copyright 2012 Google Inc. 3f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com * 4f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com * Use of this source code is governed by a BSD-style license that can be 5f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com * found in the LICENSE file. 6f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com */ 7f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com 8f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#ifndef SkOTTable_post_DEFINED 9f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#define SkOTTable_post_DEFINED 10f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com 11f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#include "SkEndian.h" 12f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#include "SkOTTableTypes.h" 13f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#include "SkTypedEnum.h" 14f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com 15f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#pragma pack(push, 1) 16f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com 17f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.comstruct SkOTTablePostScript { 18ec95a4ae45e9bff1a92627372fd771b389813fecbungeman@google.com static const SK_OT_CHAR TAG0 = 'p'; 19ec95a4ae45e9bff1a92627372fd771b389813fecbungeman@google.com static const SK_OT_CHAR TAG1 = 'o'; 20ec95a4ae45e9bff1a92627372fd771b389813fecbungeman@google.com static const SK_OT_CHAR TAG2 = 's'; 21ec95a4ae45e9bff1a92627372fd771b389813fecbungeman@google.com static const SK_OT_CHAR TAG3 = 't'; 22ec95a4ae45e9bff1a92627372fd771b389813fecbungeman@google.com static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTablePostScript>::value; 23ec95a4ae45e9bff1a92627372fd771b389813fecbungeman@google.com 24f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com struct Format { 25f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com SK_TYPED_ENUM(Value, SK_OT_Fixed, 26f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com ((version1, SkTEndian_SwapBE32(0x00010000))) 27f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com ((version2, SkTEndian_SwapBE32(0x00020000))) 28f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com ((version2_5, SkTEndian_SwapBE32(0x00025000))) 29f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com ((version3, SkTEndian_SwapBE32(0x00030000))) 30f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com ((version4, SkTEndian_SwapBE32(0x00040000))) 31f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com SK_SEQ_END, 32f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com SK_SEQ_END) 33f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com SK_OT_Fixed value; 34f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com } format; 35f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com SK_OT_Fixed italicAngle; 36f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com SK_OT_FWORD underlinePosition; 37f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com SK_OT_FWORD underlineThickness; 38f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com SK_OT_ULONG isFixedPitch; 39f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com SK_OT_ULONG minMemType42; 40f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com SK_OT_ULONG maxMemType42; 41f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com SK_OT_ULONG minMemType1; 42f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com SK_OT_ULONG maxMemType1; 43f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com}; 44f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com 45f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#pragma pack(pop) 46f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com 47f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com 48f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#include <stddef.h> 49f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.comSK_COMPILE_ASSERT(offsetof(SkOTTablePostScript, maxMemType1) == 28, SkOTTablePostScript_maxMemType1_not_at_28); 50f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.comSK_COMPILE_ASSERT(sizeof(SkOTTablePostScript) == 32, sizeof_SkOTTablePostScript_not_32); 51f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com 52f8d1aee2526a384a570b082b17f3a19fe72bd15ebungeman@google.com#endif 53