michael@0: /* michael@0: * Copyright 2013 Google Inc. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: #ifndef SkTTCFHeader_DEFINED michael@0: #define SkTTCFHeader_DEFINED michael@0: michael@0: #include "SkOTTableTypes.h" michael@0: michael@0: #pragma pack(push, 1) michael@0: michael@0: struct SkTTCFHeader { michael@0: SK_SFNT_ULONG ttcTag; michael@0: static const SK_OT_CHAR TAG0 = 't'; michael@0: static const SK_OT_CHAR TAG1 = 't'; michael@0: static const SK_OT_CHAR TAG2 = 'c'; michael@0: static const SK_OT_CHAR TAG3 = 'f'; michael@0: static const SK_OT_ULONG TAG = SkOTTableTAG::value; michael@0: michael@0: SK_OT_Fixed version; michael@0: static const SK_OT_Fixed version_1 = SkTEndian_SwapBE32(1 << 16); michael@0: static const SK_OT_Fixed version_2 = SkTEndian_SwapBE32(2 << 16); michael@0: michael@0: SK_OT_ULONG numOffsets; michael@0: //SK_OT_ULONG offset[numOffsets] michael@0: michael@0: struct Version2Ext { michael@0: SK_OT_ULONG dsigType; michael@0: struct dsigType_None { michael@0: static const SK_OT_CHAR TAG0 = 0; michael@0: static const SK_OT_CHAR TAG1 = 0; michael@0: static const SK_OT_CHAR TAG2 = 0; michael@0: static const SK_OT_CHAR TAG3 = 0; michael@0: static const SK_OT_ULONG TAG = SkOTTableTAG::value; michael@0: }; michael@0: struct dsigType_Format1 { michael@0: static const SK_OT_CHAR TAG0 = 'D'; michael@0: static const SK_OT_CHAR TAG1 = 'S'; michael@0: static const SK_OT_CHAR TAG2 = 'I'; michael@0: static const SK_OT_CHAR TAG3 = 'G'; michael@0: static const SK_OT_ULONG TAG = SkOTTableTAG::value; michael@0: }; michael@0: SK_OT_ULONG dsigLength; //Length of DSIG table (in bytes). michael@0: SK_OT_ULONG dsigOffset; //Offset of DSIG table from the beginning of file (in bytes). michael@0: };// version2ext (if version == version_2) michael@0: }; michael@0: michael@0: #pragma pack(pop) michael@0: michael@0: michael@0: SK_COMPILE_ASSERT(sizeof(SkTTCFHeader) == 12, sizeof_SkTTCFHeader_not_12); michael@0: michael@0: #endif