mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
LibGfx+Base: Tweak bitmap fonts to ensure glyph data is 4-byte aligned
When building userland with UBSAN enabled (#7434), we were getting spammed to death by unaligned access errors. Fix these by adding 2 bytes of padding to the FontFileHeader struct, and adjusting all our font files to match the new format. :^)
This commit is contained in:
parent
22d8778437
commit
8f2425125e
Notes:
sideshowbarker
2024-07-18 17:28:37 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/8f2425125e7
24 changed files with 3 additions and 0 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -35,8 +35,11 @@ struct [[gnu::packed]] FontFileHeader {
|
|||
u16 weight;
|
||||
char name[32];
|
||||
char family[32];
|
||||
u16 unused;
|
||||
};
|
||||
|
||||
static_assert(sizeof(FontFileHeader) == 80);
|
||||
|
||||
NonnullRefPtr<Font> BitmapFont::clone() const
|
||||
{
|
||||
size_t bytes_per_glyph = sizeof(u32) * glyph_height();
|
||||
|
|
Loading…
Reference in a new issue