1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:47:45 +00:00

LibPDF: Add spec comments to CFF

This commit is contained in:
Nico Weber 2023-10-12 10:18:15 -04:00 committed by Andreas Kling
parent 9d31fc3ea3
commit d451197d3d
3 changed files with 30 additions and 6 deletions

View file

@ -19,6 +19,7 @@ NonnullRefPtr<Encoding> Encoding::create()
PDFErrorOr<NonnullRefPtr<Encoding>> Encoding::from_object(Document* document, NonnullRefPtr<Object> const& obj)
{
if (obj->is<NameObject>()) {
// PDF 1.7 spec, 5.5.5 "Character Encoding"
auto name = obj->cast<NameObject>()->name();
if (name == "StandardEncoding")
return standard_encoding();