diff options
author | Julian Offenhäuser <offenhaeuser@protonmail.com> | 2023-03-24 22:16:50 +0100 |
---|---|---|
committer | Andrew Kaster <andrewdkaster@gmail.com> | 2023-03-25 16:27:30 -0600 |
commit | 5deac3a7f509d98b9c936e37272fb0605daffba3 (patch) | |
tree | 01ebc9ad5710470198f4d8213e22674f96091cfa /Userland | |
parent | fec7ccf020785f05d62e28d5ca609b04a1893c5b (diff) | |
download | serenity-5deac3a7f509d98b9c936e37272fb0605daffba3.zip |
LibPDF: Actually return an error when failing to load replacement fonts
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibPDF/Fonts/PDFFont.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibPDF/Fonts/PDFFont.cpp b/Userland/Libraries/LibPDF/Fonts/PDFFont.cpp index 30eccd2f81..0fe67792c4 100644 --- a/Userland/Libraries/LibPDF/Fonts/PDFFont.cpp +++ b/Userland/Libraries/LibPDF/Fonts/PDFFont.cpp @@ -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(); } |