Debian Codegraph @

src/sfnt/SkOTTable_post.h

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