mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03: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: https://github.com/SerenityOS/serenity/commit/5deac3a7f5 Pull-request: https://github.com/SerenityOS/serenity/pull/18031 Reviewed-by: https://github.com/ADKaster ✅
@ -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…
Reference in New Issue
Block a user