-
Notifications
You must be signed in to change notification settings - Fork 2
/
otf.yml
43 lines (34 loc) · 851 Bytes
/
otf.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# STATUS: 100%
references:
- https://docs.microsoft.com/en-us/typography/opentype/spec/
- https://en.wikipedia.org/wiki/OpenType
- https://www.sweetscape.com/010editor/repository/files/OpenType.bt
- https://raw.githubusercontent.com/synalysis/Grammars/master/opentype.grammar
kind: font
name: OpenType font
extensions: [.otf, .otc]
mime: font/otf
endian: big
magic:
- offset: 0000
match: c'OTTO'
structs:
header:
ascii[4] Magic: c'OTTO'
u16 TableCount: ??
u16 SearchRange: ??
u16 EntrySelector: ??
u16 RangeShift: ??
table:
ascii[4] Tag: ??
label: self.Tag
u32 Checksum: ??
u32 Offset: ??
u32 Length: ??
offset: self.Offset
u8[self.Length] Data: ??
u8[alignment(self.Length, 4)] Padding: ??
offset: restore
layout:
- header Header
- table[Header.TableCount] Table