Created
January 27, 2024 13:17
-
-
Save wisniewski94/286f80c7ac5eefbcb0a77f3bfd824e5b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <std/core.pat> | |
enum Tables : u16 { | |
name = 4, | |
}; | |
struct table_entry_t { | |
char name[4]; | |
u32 offset; | |
u64 length; | |
}; | |
struct header_t { | |
u8 signature[4]; | |
std::core::set_endian(std::mem::Endian::Big); | |
u16 numTables; | |
u16 offset = 12; | |
table_entry_t entries[numTables] @offset; | |
}; | |
header_t header @0x00 [[comment("TTF Signature"), name("Signature")]]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment