summaryrefslogtreecommitdiff
path: root/quantum/painter/qff.h
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/painter/qff.h')
-rw-r--r--quantum/painter/qff.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/quantum/painter/qff.h b/quantum/painter/qff.h
index 6f1a1fd815..d1d629582f 100644
--- a/quantum/painter/qff.h
+++ b/quantum/painter/qff.h
@@ -21,7 +21,7 @@
#define QFF_FONT_DESCRIPTOR_TYPEID 0x00
-typedef struct __attribute__((packed)) qff_font_descriptor_v1_t {
+typedef struct QP_PACKED qff_font_descriptor_v1_t {
qgf_block_header_v1_t header; // = { .type_id = 0x00, .neg_type_id = (~0x00), .length = 20 }
uint32_t magic : 24; // constant, equal to 0x464651 ("QFF")
uint8_t qff_version; // constant, equal to 0x01
@@ -50,13 +50,13 @@ _Static_assert(sizeof(qff_font_descriptor_v1_t) == (sizeof(qgf_block_header_v1_t
#define QFF_GLYPH_OFFSET_BITS 18
#define QFF_GLYPH_OFFSET_MASK (((1 << QFF_GLYPH_OFFSET_BITS) - 1) << QFF_GLYPH_WIDTH_BITS)
-typedef struct __attribute__((packed)) qff_ascii_glyph_v1_t {
+typedef struct QP_PACKED qff_ascii_glyph_v1_t {
uint32_t value : 24; // Uses QFF_GLYPH_*_(BITS|MASK) as bitfield ordering is compiler-defined
} qff_ascii_glyph_v1_t;
_Static_assert(sizeof(qff_ascii_glyph_v1_t) == 3, "qff_ascii_glyph_v1_t must be 3 bytes in v1 of QFF");
-typedef struct __attribute__((packed)) qff_ascii_glyph_table_v1_t {
+typedef struct QP_PACKED qff_ascii_glyph_table_v1_t {
qgf_block_header_v1_t header; // = { .type_id = 0x01, .neg_type_id = (~0x01), .length = 285 }
qff_ascii_glyph_v1_t glyph[95]; // 95 glyphs, 0x20..0x7E
} qff_ascii_glyph_table_v1_t;
@@ -68,14 +68,14 @@ _Static_assert(sizeof(qff_ascii_glyph_table_v1_t) == (sizeof(qgf_block_header_v1
#define QFF_UNICODE_GLYPH_DESCRIPTOR_TYPEID 0x02
-typedef struct __attribute__((packed)) qff_unicode_glyph_v1_t {
+typedef struct QP_PACKED qff_unicode_glyph_v1_t {
uint32_t code_point : 24;
uint32_t value : 24; // Uses QFF_GLYPH_*_(BITS|MASK) as bitfield ordering is compiler-defined
} qff_unicode_glyph_v1_t;
_Static_assert(sizeof(qff_unicode_glyph_v1_t) == 6, "qff_unicode_glyph_v1_t must be 6 bytes in v1 of QFF");
-typedef struct __attribute__((packed)) qff_unicode_glyph_table_v1_t {
+typedef struct QP_PACKED qff_unicode_glyph_table_v1_t {
qgf_block_header_v1_t header; // = { .type_id = 0x02, .neg_type_id = (~0x02), .length = (N * 6) }
qff_unicode_glyph_v1_t glyph[0]; // Extent of '0' signifies that this struct is immediately followed by the glyph data
} qff_unicode_glyph_table_v1_t;