aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sfnt/SkOTTable_maxp_TT.h
blob: ad472a1f16a6e58268027370f01455accf556919 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * Copyright 2012 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef SkOTTable_maxp_TT_DEFINED
#define SkOTTable_maxp_TT_DEFINED

#include "SkEndian.h"
#include "SkOTTableTypes.h"
#include "SkTypedEnum.h"

#pragma pack(push, 1)

struct SkOTTableMaximumProfile_TT {
    SK_OT_Fixed version;
    static const SK_OT_Fixed VERSION = SkTEndian_SwapBE32(0x00010000);

    SK_OT_USHORT numGlyphs;
    SK_OT_USHORT maxPoints;
    SK_OT_USHORT maxContours;
    SK_OT_USHORT maxCompositePoints;
    SK_OT_USHORT maxCompositeContours;
    struct MaxZones {
        SK_TYPED_ENUM(Value, SK_OT_SHORT,
            ((DoesNotUseTwilightZone, SkTEndian_SwapBE16(1)))
            ((UsesTwilightZone, SkTEndian_SwapBE16(2)))
            SK_SEQ_END,
        (value)SK_SEQ_END)
    } maxZones;
    SK_OT_USHORT maxTwilightPoints;
    SK_OT_USHORT maxStorage;
    SK_OT_USHORT maxFunctionDefs;
    SK_OT_USHORT maxInstructionDefs;
    SK_OT_USHORT maxStackElements;
    SK_OT_USHORT maxSizeOfInstructions;
    SK_OT_USHORT maxComponentDepth;
};

#pragma pack(pop)


#include <stddef.h>
SK_COMPILE_ASSERT(offsetof(SkOTTableMaximumProfile_TT, maxComponentDepth) == 28, SkOTTableMaximumProfile_TT_maxComponentDepth_not_at_26);
SK_COMPILE_ASSERT(sizeof(SkOTTableMaximumProfile_TT) == 30, sizeof_SkOTTableMaximumProfile_TT_not_28);

#endif