mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-09 04:37:52 +03:00
LibPDF: Make Subrs optional in PS1FontProgram
https://adobe-type-tools.github.io/font-tech-notes/pdfs/T1_SPEC.pdf : "Using charstring subroutines is not a requirement of a Type 1 font program." And some versions of Computer Modern do in fact not contain a Subrs array. Together with #21473, makes Problemset.pdf from the pdffiles repro render ok instead of crashing.
This commit is contained in:
parent
063e66cae9
commit
f0e7fb7038
Notes:
sideshowbarker
2024-07-16 23:52:10 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/f0e7fb7038 Pull-request: https://github.com/SerenityOS/serenity/pull/21480
@ -70,9 +70,9 @@ PDFErrorOr<void> PS1FontProgram::parse_encrypted_portion(ByteBuffer const& buffe
|
||||
if (seek_name(reader, "lenIV"))
|
||||
m_lenIV = TRY(parse_int(reader));
|
||||
|
||||
if (!seek_name(reader, "Subrs"))
|
||||
return error("Missing subroutine array");
|
||||
auto subroutines = TRY(parse_subroutines(reader));
|
||||
Vector<ByteBuffer> subroutines;
|
||||
if (seek_name(reader, "Subrs"))
|
||||
subroutines = TRY(parse_subroutines(reader));
|
||||
|
||||
if (!seek_name(reader, "CharStrings"))
|
||||
return error("Missing char strings array");
|
||||
|
Loading…
Reference in New Issue
Block a user