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

LibGfx/OpenType: Tweak Font::try_load_from_externally_owned_memory()

It now takes an Options object instead of passing several default
parameters.

No behavior change.
This commit is contained in:
Nico Weber 2024-02-20 11:12:09 -05:00 committed by Andreas Kling
parent 3b616b6af8
commit 41eca52b50
4 changed files with 19 additions and 12 deletions

View file

@ -158,7 +158,7 @@ ErrorOr<NonnullRefPtr<Font>> Font::try_load_from_externally_owned_memory(Readonl
if (header.total_sfnt_size != expected_total_sfnt_size)
return Error::from_string_literal("Invalid WOFF total sfnt size");
auto input_font = TRY(OpenType::Font::try_load_from_externally_owned_memory(font_buffer.bytes(), index));
auto input_font = TRY(OpenType::Font::try_load_from_externally_owned_memory(font_buffer.bytes(), { .index = index }));
auto font = adopt_ref(*new Font(input_font, move(font_buffer)));
return font;
}