[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug report: Allow CFF based OT fonts with missing map table
From: |
Derek B. Noonburg |
Subject: |
Re: Bug report: Allow CFF based OT fonts with missing map table |
Date: |
Fri, 31 May 2024 11:23:02 -0700 |
For what it's worth, I've encountered the same problem in a few PDF
files. In all the cases I've seen, the OpenType file contains just the
'CFF ' table. My code checks for a missing 'head' table, and in that
case it extracts the CFF blob and handles it as a CFF (not OpenType)
font.
I haven't run into a font that has 'head' and 'CFF ', but not 'cmap'.
If that's what you have, it would be a problem for my code, too.
- Derek
On Fri, 24 May 2024 16:28:12 +0000
Honnesh Ramachandra <hramachandra@adobe.com> wrote:
> Hello,
>
> This issue relates to PDF specification and its usage of CFF based
> embedded fonts for it Type0 fonts. For Type0 fonts containing
> CID-keyed descendant CFF-based fonts, the glyph index is the CID
> present in the content stream. As a result, there is no requirement
> for a ‘cmap’ table to be present in the font since the glyph indices
> are derived directly from the CIDs. FreeType 2.13.2 throws an error
> when it doesn’t find a ‘cmap’ table for such an Open Type font
> containing CFF outlines. I suggest relaxing this requirement for a
> ‘cmap’ table for such fonts. I have attached my suggested fix with
> this email. For legal reasons, I have not attached the embedded font
> that encounters this problem. Here is a diff to highlight the
> proposed change
>
> [A screenshot of a computer Description automatically generated]
>
> Thank you for your time and consideration.
>
> Honnesh Ramachandra