Skip to content
This repository was archived by the owner on Jan 2, 2023. It is now read-only.
This repository was archived by the owner on Jan 2, 2023. It is now read-only.

Font Names with spaces not correctly escaped #3857

@nicolas-schreiber

Description

@nicolas-schreiber

Hi,
I have a problem with embedded fonts with spaces in their name.
In my case this is with Source Han Sans.
This is the desired output with SourceHanSans embedded:

<< /Type /Font
/Subtype /CIDFontType2
/BaseFont /Source#20Han#20Sans#20Bold
/CIDSystemInfo << /Registry (Adobe) /Ordering (Identity) /Supplement 0 >>
/FontDescriptor 13 0 R
/CIDToGIDMap /Identity
/DW 992 >>

But wkhtmltopdf creates following:

<< /Type /Font
/Subtype /CIDFontType2
/BaseFont /Source Han Sans Bold
/CIDSystemInfo << /Registry (Adobe) /Ordering (Identity) /Supplement 0 >>
/FontDescriptor 13 0 R
/CIDToGIDMap /Identity
/DW 992 >>

The poppler-utils pdffonts spits out a lot of Dictionary key must be a name object errors with the current output and the PDFViewers show blank screens.

If I manually escape that /BaseFont it works like a charm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions