Flutter Engine
The Flutter Engine
SkSFNTHeader.h
Go to the documentation of this file.
1/*
2 * Copyright 2012 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 SkSFNTHeader_DEFINED
9#define SkSFNTHeader_DEFINED
10
11#include "src/base/SkEndian.h"
13
14//All SK_SFNT_ prefixed types should be considered as big endian.
15typedef uint16_t SK_SFNT_USHORT;
16typedef uint32_t SK_SFNT_ULONG;
17
18#pragma pack(push, 1)
19
20struct SkSFNTHeader {
23 static const SK_OT_CHAR TAG0 = 0;
24 static const SK_OT_CHAR TAG1 = 1;
25 static const SK_OT_CHAR TAG2 = 0;
26 static const SK_OT_CHAR TAG3 = 0;
28 };
30 static const SK_OT_CHAR TAG0 = 't';
31 static const SK_OT_CHAR TAG1 = 'r';
32 static const SK_OT_CHAR TAG2 = 'u';
33 static const SK_OT_CHAR TAG3 = 'e';
35 };
37 static const SK_OT_CHAR TAG0 = 't';
38 static const SK_OT_CHAR TAG1 = 'y';
39 static const SK_OT_CHAR TAG2 = 'p';
40 static const SK_OT_CHAR TAG3 = '1';
42 };
44 static const SK_OT_CHAR TAG0 = 'O';
45 static const SK_OT_CHAR TAG1 = 'T';
46 static const SK_OT_CHAR TAG2 = 'T';
47 static const SK_OT_CHAR TAG3 = 'O';
49 };
50
55
59 SK_SFNT_ULONG offset; //From beginning of header.
61 }; //tableDirectoryEntries[numTables]
62};
63
64#pragma pack(pop)
65
66
67static_assert(sizeof(SkSFNTHeader) == 12, "sizeof_SkSFNTHeader_not_12");
68static_assert(sizeof(SkSFNTHeader::TableDirectoryEntry) == 16, "sizeof_SkSFNTHeader_TableDirectoryEntry_not_16");
69
70#endif
uint32_t SK_OT_ULONG
int8_t SK_OT_CHAR
uint32_t SK_SFNT_ULONG
Definition: SkSFNTHeader.h:16
uint16_t SK_SFNT_USHORT
Definition: SkSFNTHeader.h:15
static const SK_OT_CHAR TAG3
Definition: SkSFNTHeader.h:33
static const SK_OT_CHAR TAG1
Definition: SkSFNTHeader.h:31
static const SK_OT_CHAR TAG2
Definition: SkSFNTHeader.h:32
static const SK_OT_ULONG TAG
Definition: SkSFNTHeader.h:34
static const SK_OT_CHAR TAG0
Definition: SkSFNTHeader.h:30
static const SK_OT_CHAR TAG1
Definition: SkSFNTHeader.h:45
static const SK_OT_CHAR TAG3
Definition: SkSFNTHeader.h:47
static const SK_OT_ULONG TAG
Definition: SkSFNTHeader.h:48
static const SK_OT_CHAR TAG2
Definition: SkSFNTHeader.h:46
static const SK_OT_CHAR TAG0
Definition: SkSFNTHeader.h:44
static const SK_OT_CHAR TAG0
Definition: SkSFNTHeader.h:37
static const SK_OT_CHAR TAG1
Definition: SkSFNTHeader.h:38
static const SK_OT_CHAR TAG3
Definition: SkSFNTHeader.h:40
static const SK_OT_CHAR TAG2
Definition: SkSFNTHeader.h:39
static const SK_OT_ULONG TAG
Definition: SkSFNTHeader.h:41
static const SK_OT_ULONG TAG
Definition: SkSFNTHeader.h:27
SK_SFNT_USHORT rangeShift
Definition: SkSFNTHeader.h:54
SK_SFNT_USHORT searchRange
Definition: SkSFNTHeader.h:52
SK_SFNT_USHORT entrySelector
Definition: SkSFNTHeader.h:53
SK_SFNT_ULONG fontType
Definition: SkSFNTHeader.h:21
SK_SFNT_USHORT numTables
Definition: SkSFNTHeader.h:51