blob: a5525d47800125a352e2567a5e1e37fc2bbdb7e9 [file] [log] [blame]
bungeman@google.comf8d1aee2012-02-02 19:15:21 +00001/*
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
17struct SkOTTablePostScript {
18 struct Format {
19 SK_TYPED_ENUM(Value, SK_OT_Fixed,
20 ((version1, SkTEndian_SwapBE32(0x00010000)))
21 ((version2, SkTEndian_SwapBE32(0x00020000)))
22 ((version2_5, SkTEndian_SwapBE32(0x00025000)))
23 ((version3, SkTEndian_SwapBE32(0x00030000)))
24 ((version4, SkTEndian_SwapBE32(0x00040000)))
25 SK_SEQ_END,
26 SK_SEQ_END)
27 SK_OT_Fixed value;
28 } format;
29 SK_OT_Fixed italicAngle;
30 SK_OT_FWORD underlinePosition;
31 SK_OT_FWORD underlineThickness;
32 SK_OT_ULONG isFixedPitch;
33 SK_OT_ULONG minMemType42;
34 SK_OT_ULONG maxMemType42;
35 SK_OT_ULONG minMemType1;
36 SK_OT_ULONG maxMemType1;
37};
38
39#pragma pack(pop)
40
41
42#include <stddef.h>
43SK_COMPILE_ASSERT(offsetof(SkOTTablePostScript, maxMemType1) == 28, SkOTTablePostScript_maxMemType1_not_at_28);
44SK_COMPILE_ASSERT(sizeof(SkOTTablePostScript) == 32, sizeof_SkOTTablePostScript_not_32);
45
46#endif