commit-bot@chromium.org | b5e34e2 | 2013-05-07 15:28:15 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2013 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 SkTTCFHeader_DEFINED |
| 9 | #define SkTTCFHeader_DEFINED |
| 10 | |
| 11 | #include "SkOTTableTypes.h" |
Hal Canary | 6b20a55 | 2017-02-07 14:09:38 -0500 | [diff] [blame] | 12 | #include "SkSFNTHeader.h" |
commit-bot@chromium.org | b5e34e2 | 2013-05-07 15:28:15 +0000 | [diff] [blame] | 13 | |
| 14 | #pragma pack(push, 1) |
| 15 | |
| 16 | struct SkTTCFHeader { |
| 17 | SK_SFNT_ULONG ttcTag; |
| 18 | static const SK_OT_CHAR TAG0 = 't'; |
| 19 | static const SK_OT_CHAR TAG1 = 't'; |
| 20 | static const SK_OT_CHAR TAG2 = 'c'; |
| 21 | static const SK_OT_CHAR TAG3 = 'f'; |
| 22 | static const SK_OT_ULONG TAG = SkOTTableTAG<SkTTCFHeader>::value; |
| 23 | |
| 24 | SK_OT_Fixed version; |
| 25 | static const SK_OT_Fixed version_1 = SkTEndian_SwapBE32(1 << 16); |
| 26 | static const SK_OT_Fixed version_2 = SkTEndian_SwapBE32(2 << 16); |
skia.committer@gmail.com | 2b34fe0 | 2013-05-08 07:01:40 +0000 | [diff] [blame] | 27 | |
commit-bot@chromium.org | b5e34e2 | 2013-05-07 15:28:15 +0000 | [diff] [blame] | 28 | SK_OT_ULONG numOffsets; |
| 29 | //SK_OT_ULONG offset[numOffsets] |
| 30 | |
| 31 | struct Version2Ext { |
| 32 | SK_OT_ULONG dsigType; |
| 33 | struct dsigType_None { |
| 34 | static const SK_OT_CHAR TAG0 = 0; |
| 35 | static const SK_OT_CHAR TAG1 = 0; |
| 36 | static const SK_OT_CHAR TAG2 = 0; |
| 37 | static const SK_OT_CHAR TAG3 = 0; |
| 38 | static const SK_OT_ULONG TAG = SkOTTableTAG<dsigType_None>::value; |
| 39 | }; |
| 40 | struct dsigType_Format1 { |
| 41 | static const SK_OT_CHAR TAG0 = 'D'; |
| 42 | static const SK_OT_CHAR TAG1 = 'S'; |
| 43 | static const SK_OT_CHAR TAG2 = 'I'; |
| 44 | static const SK_OT_CHAR TAG3 = 'G'; |
| 45 | static const SK_OT_ULONG TAG = SkOTTableTAG<dsigType_Format1>::value; |
| 46 | }; |
| 47 | SK_OT_ULONG dsigLength; //Length of DSIG table (in bytes). |
| 48 | SK_OT_ULONG dsigOffset; //Offset of DSIG table from the beginning of file (in bytes). |
| 49 | };// version2ext (if version == version_2) |
| 50 | }; |
| 51 | |
| 52 | #pragma pack(pop) |
| 53 | |
| 54 | |
bungeman | 99fe822 | 2015-08-20 07:57:51 -0700 | [diff] [blame] | 55 | static_assert(sizeof(SkTTCFHeader) == 12, "sizeof_SkTTCFHeader_not_12"); |
commit-bot@chromium.org | b5e34e2 | 2013-05-07 15:28:15 +0000 | [diff] [blame] | 56 | |
| 57 | #endif |