mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 10:19:20 +00:00
LibPDF: Propagate errors in PDFFont::create()
This commit is contained in:
parent
ac31b1bda3
commit
2a70ea3ee7
Notes:
sideshowbarker
2024-07-17 06:09:44 +09:00
Author: https://github.com/janso3
Commit: 2a70ea3ee7
Pull-request: https://github.com/SerenityOS/serenity/pull/16933
Reviewed-by: https://github.com/nico
1 changed files with 2 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <AK/String.h>
|
||||||
#include <LibGfx/Font/FontDatabase.h>
|
#include <LibGfx/Font/FontDatabase.h>
|
||||||
#include <LibPDF/CommonNames.h>
|
#include <LibPDF/CommonNames.h>
|
||||||
#include <LibPDF/Fonts/PDFFont.h>
|
#include <LibPDF/Fonts/PDFFont.h>
|
||||||
|
@ -83,8 +84,7 @@ PDFErrorOr<NonnullRefPtr<PDFFont>> PDFFont::create(Document* document, NonnullRe
|
||||||
if (subtype == "TrueType")
|
if (subtype == "TrueType")
|
||||||
return TRY(TrueTypeFont::create(document, dict, font_size));
|
return TRY(TrueTypeFont::create(document, dict, font_size));
|
||||||
|
|
||||||
dbgln("Unknown font subtype: {}", subtype);
|
return Error(Error::Type::Internal, TRY(String::formatted("Unhandled font subtype: {}", subtype)).to_deprecated_string());
|
||||||
TODO();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Tuple<DeprecatedString, DeprecatedString> PDFFont::replacement_for_standard_latin_font(StringView name)
|
Tuple<DeprecatedString, DeprecatedString> PDFFont::replacement_for_standard_latin_font(StringView name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue