1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:07:45 +00:00

LibGfx: Use FourCC as OpenType::Tag type

The one deviation from the spec here is to use this in the WOFF
TableDirectoryEntry's tag field. However, *not* making that a Tag made
a lot of things more complicated than they need to be.
This commit is contained in:
Sam Atkins 2023-11-20 17:04:56 +00:00 committed by Andreas Kling
parent 0423225290
commit 54d0aafff0
5 changed files with 97 additions and 127 deletions

View file

@ -36,7 +36,7 @@ static_assert(AssertSize<Header, 44>());
// https://www.w3.org/TR/WOFF/#TableDirectory
struct [[gnu::packed]] TableDirectoryEntry {
BigEndian<u32> tag; // 4-byte sfnt table identifier.
OpenType::Tag tag; // 4-byte sfnt table identifier.
BigEndian<u32> offset; // Offset to the data, from beginning of WOFF file.
BigEndian<u32> comp_length; // Length of the compressed data, excluding padding.
BigEndian<u32> orig_length; // Length of the uncompressed table, excluding padding.