mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 20:16:02 +00:00
LibPDF: Actually return an error when failing to load replacement fonts
This commit is contained in:
parent
fec7ccf020
commit
5deac3a7f5
Notes:
sideshowbarker
2024-07-16 22:19:44 +09:00
Author: https://github.com/janso3
Commit: 5deac3a7f5
Pull-request: https://github.com/SerenityOS/serenity/pull/18031
Reviewed-by: https://github.com/ADKaster ✅
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