mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:57:46 +00: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
1 changed files with 3 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue