pdf-association / pdf-issues

Industry-based resolutions for issues and errata reported against any PDF-related specification
https://pdf-issues.pdfa.org/
67 stars 2 forks source link

[Question] Are PostScript Type1 seem like CID Keyed fonts supported by PDF? #497

Open ceztko opened 4 days ago

ceztko commented 4 days ago

Adobe Technical Note #5014 "Adobe CMap and CIDFont Files Specification" describes a special postscript Type1 seem like font format that is CID keyed (examples of such fonts can be found at this link). The specified document is often mentioned in the PDF specification speaking about CMap format, but at page 328 of ISO 32000-2:2020 it's stated:

NOTE For complete documentation on the architecture and the file formats, see Adobe Technical Note

5092, CID-Keyed Font Technology Overview, and Adobe Technical Note #5014, Adobe CMap and

CIDFont Files Specification. This subclause describes only the PDF objects that represent these font programs.

So said, it's unclear to me if this font is supported by the PDF specification at all. In fact such format cannot be used in a /Type1 PDF font (because it's neither a regular Type1 Postscript to be embedded in /FontFile nor a CFF converted Type1 font to be embedded in /FontFile3 with subtype /Type1C). It also cannot be used in a PDF /Type0 composite font because supported formats for descendant fonts are either FreeType/OpenType fonts with a glyf table or CFF based fonts (see Table 124).

At page 328 it's mentioned:

As mentioned earlier, PDF does not support the entire CID - keyed font architecture, which is independent of PDF; CID - keyed fonts may be used in other environments".

I wonder if the specification could be more clear explicitly stating if these fonts are supported or not. As an additional information, these fonts can be opened by FreeType and FT_Get_Font_Format returns CID Type 1.

petervwyatt commented 3 days ago

@lrosenthol ?

faceless2 commented 3 days ago

For what it's worth I agree with ceztko's assessment - these fonts cannot be used with PDF, for the reasons he listed (it's not a Simple Type1, and it's not a valid subtype for Type0). I'm prety confident we've never seen a PDF that's tried to use one, and that includes all of GovDocs1 and corpora.tika.apache.org.

It's perhaps not clear when skimming just p328 that these fonts definitely cannot be used, but it's going to become very clear the moment anyone tried to implement code to do so for the reasons already outlined. So I don't personally think a spec clarification is required here, although like all clarifications it's not going to do any harm.