180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru/*
280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * Copyright 2012 Google Inc.
380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * Use of this source code is governed by a BSD-style license that can be
580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * found in the LICENSE file.
680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru */
780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#ifndef SkOTTable_post_DEFINED
980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#define SkOTTable_post_DEFINED
1080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
1180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#include "SkEndian.h"
1280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#include "SkOTTableTypes.h"
1380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#include "SkTypedEnum.h"
1480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
1580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#pragma pack(push, 1)
1680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
1780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Querustruct SkOTTablePostScript {
1880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    static const SK_OT_CHAR TAG0 = 'p';
1980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    static const SK_OT_CHAR TAG1 = 'o';
2080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    static const SK_OT_CHAR TAG2 = 's';
2180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    static const SK_OT_CHAR TAG3 = 't';
2280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    static const SK_OT_ULONG TAG = SkOTTableTAG<SkOTTablePostScript>::value;
2380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
2480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    struct Format {
2580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru        SK_TYPED_ENUM(Value, SK_OT_Fixed,
2680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru            ((version1, SkTEndian_SwapBE32(0x00010000)))
2780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru            ((version2, SkTEndian_SwapBE32(0x00020000)))
2880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru            ((version2_5, SkTEndian_SwapBE32(0x00025000)))
2980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru            ((version3, SkTEndian_SwapBE32(0x00030000)))
3080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru            ((version4, SkTEndian_SwapBE32(0x00040000)))
3180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru            SK_SEQ_END,
3280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru        SK_SEQ_END)
3380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru        SK_OT_Fixed value;
3480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    } format;
3580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    SK_OT_Fixed italicAngle;
3680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    SK_OT_FWORD underlinePosition;
3780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    SK_OT_FWORD underlineThickness;
3880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    SK_OT_ULONG isFixedPitch;
3980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    SK_OT_ULONG minMemType42;
4080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    SK_OT_ULONG maxMemType42;
4180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    SK_OT_ULONG minMemType1;
4280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    SK_OT_ULONG maxMemType1;
4380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru};
4480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
4580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#pragma pack(pop)
4680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
4780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
4880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#include <stddef.h>
4980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste QueruSK_COMPILE_ASSERT(offsetof(SkOTTablePostScript, maxMemType1) == 28, SkOTTablePostScript_maxMemType1_not_at_28);
5080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste QueruSK_COMPILE_ASSERT(sizeof(SkOTTablePostScript) == 32, sizeof_SkOTTablePostScript_not_32);
5180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
5280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
53