mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:17: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:
parent
3b616b6af8
commit
41eca52b50
4 changed files with 19 additions and 12 deletions
|
@ -183,7 +183,7 @@ PDFErrorOr<NonnullOwnPtr<CIDFontType2>> CIDFontType2::create(Document* document,
|
|||
if (descriptor->contains(CommonNames::FontFile2)) {
|
||||
auto font_file_stream = TRY(descriptor->get_stream(document, CommonNames::FontFile2));
|
||||
float point_size = (font_size * POINTS_PER_INCH) / DEFAULT_DPI;
|
||||
auto ttf_font = TRY(OpenType::Font::try_load_from_externally_owned_memory(font_file_stream->bytes(), 0, move(cid_to_gid_map)));
|
||||
auto ttf_font = TRY(OpenType::Font::try_load_from_externally_owned_memory(font_file_stream->bytes(), { .external_cmap = move(cid_to_gid_map) }));
|
||||
font = adopt_ref(*new Gfx::ScaledFont(*ttf_font, point_size, point_size));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue