mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
LibPDF: Give Type3 fonts a dedicated error message
They're described in "5.5.4 Type 3 Fonts" in the PDF 1.7 spec, so we shouldn't `internal_error()` on them. They're just not implemented yet.
This commit is contained in:
parent
6bed27cca9
commit
26fd29baf8
Notes:
sideshowbarker
2024-07-16 22:58:46 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/26fd29baf8 Pull-request: https://github.com/SerenityOS/serenity/pull/21946 Reviewed-by: https://github.com/AtkinsSJ
1 changed files with 4 additions and 2 deletions
|
@ -41,9 +41,11 @@ PDFErrorOr<NonnullRefPtr<PDFFont>> PDFFont::create(Document* document, NonnullRe
|
|||
font = adopt_ref(*new Type1Font());
|
||||
} else if (subtype == "TrueType") {
|
||||
font = adopt_ref(*new TrueTypeFont());
|
||||
} else if (subtype == "Type0")
|
||||
} else if (subtype == "Type0") {
|
||||
font = adopt_ref(*new Type0Font());
|
||||
else {
|
||||
} else if (subtype == "Type3") {
|
||||
return Error { Error::Type::RenderingUnsupported, "Type3 fonts not yet implemented" };
|
||||
} else {
|
||||
dbgln_if(PDF_DEBUG, "Unhandled font subtype: {}", subtype);
|
||||
return Error::internal_error("Unhandled font subtype");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue