1cb93a386Sopenharmony_ci/* 2cb93a386Sopenharmony_ci * Copyright 2013 Google Inc. 3cb93a386Sopenharmony_ci * 4cb93a386Sopenharmony_ci * Use of this source code is governed by a BSD-style license that can be 5cb93a386Sopenharmony_ci * found in the LICENSE file. 6cb93a386Sopenharmony_ci */ 7cb93a386Sopenharmony_ci 8cb93a386Sopenharmony_ci#ifndef SkTTCFHeader_DEFINED 9cb93a386Sopenharmony_ci#define SkTTCFHeader_DEFINED 10cb93a386Sopenharmony_ci 11cb93a386Sopenharmony_ci#include "src/sfnt/SkOTTableTypes.h" 12cb93a386Sopenharmony_ci#include "src/sfnt/SkSFNTHeader.h" 13cb93a386Sopenharmony_ci 14cb93a386Sopenharmony_ci#pragma pack(push, 1) 15cb93a386Sopenharmony_ci 16cb93a386Sopenharmony_cistruct SkTTCFHeader { 17cb93a386Sopenharmony_ci SK_SFNT_ULONG ttcTag; 18cb93a386Sopenharmony_ci static const SK_OT_CHAR TAG0 = 't'; 19cb93a386Sopenharmony_ci static const SK_OT_CHAR TAG1 = 't'; 20cb93a386Sopenharmony_ci static const SK_OT_CHAR TAG2 = 'c'; 21cb93a386Sopenharmony_ci static const SK_OT_CHAR TAG3 = 'f'; 22cb93a386Sopenharmony_ci static const SK_OT_ULONG TAG = SkOTTableTAG<SkTTCFHeader>::value; 23cb93a386Sopenharmony_ci 24cb93a386Sopenharmony_ci SK_OT_Fixed version; 25cb93a386Sopenharmony_ci static const SK_OT_Fixed version_1 = SkTEndian_SwapBE32(1 << 16); 26cb93a386Sopenharmony_ci static const SK_OT_Fixed version_2 = SkTEndian_SwapBE32(2 << 16); 27cb93a386Sopenharmony_ci 28cb93a386Sopenharmony_ci SK_OT_ULONG numOffsets; 29cb93a386Sopenharmony_ci //SK_OT_ULONG offset[numOffsets] 30cb93a386Sopenharmony_ci 31cb93a386Sopenharmony_ci struct Version2Ext { 32cb93a386Sopenharmony_ci SK_OT_ULONG dsigType; 33cb93a386Sopenharmony_ci struct dsigType_None { 34cb93a386Sopenharmony_ci static const SK_OT_CHAR TAG0 = 0; 35cb93a386Sopenharmony_ci static const SK_OT_CHAR TAG1 = 0; 36cb93a386Sopenharmony_ci static const SK_OT_CHAR TAG2 = 0; 37cb93a386Sopenharmony_ci static const SK_OT_CHAR TAG3 = 0; 38cb93a386Sopenharmony_ci static const SK_OT_ULONG TAG = SkOTTableTAG<dsigType_None>::value; 39cb93a386Sopenharmony_ci }; 40cb93a386Sopenharmony_ci struct dsigType_Format1 { 41cb93a386Sopenharmony_ci static const SK_OT_CHAR TAG0 = 'D'; 42cb93a386Sopenharmony_ci static const SK_OT_CHAR TAG1 = 'S'; 43cb93a386Sopenharmony_ci static const SK_OT_CHAR TAG2 = 'I'; 44cb93a386Sopenharmony_ci static const SK_OT_CHAR TAG3 = 'G'; 45cb93a386Sopenharmony_ci static const SK_OT_ULONG TAG = SkOTTableTAG<dsigType_Format1>::value; 46cb93a386Sopenharmony_ci }; 47cb93a386Sopenharmony_ci SK_OT_ULONG dsigLength; //Length of DSIG table (in bytes). 48cb93a386Sopenharmony_ci SK_OT_ULONG dsigOffset; //Offset of DSIG table from the beginning of file (in bytes). 49cb93a386Sopenharmony_ci };// version2ext (if version == version_2) 50cb93a386Sopenharmony_ci}; 51cb93a386Sopenharmony_ci 52cb93a386Sopenharmony_ci#pragma pack(pop) 53cb93a386Sopenharmony_ci 54cb93a386Sopenharmony_ci 55cb93a386Sopenharmony_cistatic_assert(sizeof(SkTTCFHeader) == 12, "sizeof_SkTTCFHeader_not_12"); 56cb93a386Sopenharmony_ci 57cb93a386Sopenharmony_ci#endif 58