mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:47:45 +00:00
LibPDF: Actually return an error when failing to load replacement fonts
This commit is contained in:
parent
fec7ccf020
commit
5deac3a7f5
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ PDFErrorOr<NonnullRefPtr<Gfx::Font>> PDFFont::replacement_for(StringView name, f
|
|||
float point_size = (font_size * POINTS_PER_INCH) / DEFAULT_DPI;
|
||||
auto font = Gfx::FontDatabase::the().get(font_family, font_variant, point_size);
|
||||
if (!font)
|
||||
Error::internal_error("Failed to load {} {} at {}pt", font_family, font_variant, point_size);
|
||||
return Error::internal_error("Failed to load {} {} at {}pt", font_family, font_variant, point_size);
|
||||
return font.release_nonnull();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue