mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 08:38:10 +00:00
LibPDF: Reject CFFs with more than one font
The code assumes that there's just one Top DICT, so let's be loud when that isn't the case.
This commit is contained in:
parent
8388fe51b5
commit
c825194fb9
1 changed files with 3 additions and 0 deletions
|
@ -64,6 +64,9 @@ PDFErrorOr<NonnullRefPtr<CFF>> CFF::create(ReadonlyBytes const& cff_bytes, RefPt
|
|||
return TRY(font_names.try_append(font_name));
|
||||
}));
|
||||
|
||||
if (font_names.size() != 1)
|
||||
return error("CFFs with more than one font not yet implemented");
|
||||
|
||||
auto cff = adopt_ref(*new CFF());
|
||||
cff->set_font_matrix({ 0.001f, 0.0f, 0.0f, 0.001f, 0.0f, 0.0f });
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue