blob: 1af692983f815fa1173532ce0fb6ad9c20807591 [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"
bungeman@google.comf8d1aee2012-02-02 19:15:21 +000013
14#pragma pack(push, 1)
15
16struct SkOTTablePostScript {
bungeman@google.comec95a4a2012-06-25 14:26:48 +000017 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
bungeman@google.comf8d1aee2012-02-02 19:15:21 +000023 struct Format {
bungeman8fd23a82016-08-16 12:27:49 -070024 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 };
bungeman@google.comf8d1aee2012-02-02 19:15:21 +000031 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>
bungeman99fe8222015-08-20 07:57:51 -070047static_assert(offsetof(SkOTTablePostScript, maxMemType1) == 28, "SkOTTablePostScript_maxMemType1_not_at_28");
48static_assert(sizeof(SkOTTablePostScript) == 32, "sizeof_SkOTTablePostScript_not_32");
bungeman@google.comf8d1aee2012-02-02 19:15:21 +000049
50#endif