Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type3 FontDescriptors FontName confusion #11

Closed
petervwyatt opened this issue Jan 1, 2021 · 5 comments
Closed

Type3 FontDescriptors FontName confusion #11

petervwyatt opened this issue Jan 1, 2021 · 5 comments
Labels
ISO approved Resolved issue approved by ISO

Comments

@petervwyatt
Copy link
Member

ISO 32000-2:2020 "Table 120 — Entries common to all font descriptors" FontName is described as "(Required) The PostScript name of the font. This name shall be the same as the value of BaseFont in the font or CIDFont dictionary that refers to this font descriptor."

Type3 fonts don't have BaseName as defined by Table 110 so therefore the FontDescriptor FontName should be not required for Type3.

@petervwyatt petervwyatt added the bug Something isn't working label Jan 1, 2021
@lrosenthol
Copy link
Collaborator

Then how would you know the name of the font, such as for display in a processor's UX?

@petervwyatt
Copy link
Member Author

So are you saying "Table 110 — Entries in a Type 3 font dictionary" is incorrect then and needs BaseFont?
Or that "Table 120 — Entries common to all font descriptors" FontName description is incorrect/incomplete for Type3?

@petervwyatt petervwyatt changed the title Type3 FontDescriptors should not require FontName Type3 FontDescriptors FontName confusion Jan 2, 2021
@lrosenthol
Copy link
Collaborator

did some reading of code and here is the situation...

For Type 3 fonts, the name comes from the Name key (if present) in the Type 3 font dictionary. For all other font types, it comes from the BaseFont key of the relevant subtype's font dictionary (eg. T1, TTF, etc.).

The FontName key in the font descriptor dictionary is used primarily for the purpose of determining if a font has been subset, based on the requirements of 9.9.2 (Font subsets).

Since Type 3 fonts are either always subset or never subset (depending on how you look at it), there is never a need to have the FontName key present in the font descriptor dictionary. Accordingly, I'd change Table 120 to make it "(Required for non-Type 3 fonts)".

@petervwyatt
Copy link
Member Author

Proposed solution: change Table 120 — Entries common to all font descriptors, FontName to say:

(Required for non-Type 3 fonts)

@petervwyatt petervwyatt added the proposed solution Proposed solution is ready for review label Jan 4, 2021
@MPBailey
Copy link
Collaborator

Just saying "Required for non-Type 3 fonts" doesn't say it shall not be there for Type 3, which leads to two problems:

  • the rest of the text doesn't make any sense for t3 fonts
  • it doesn't make any statement about it having to match anything else for a T3 font.

It may be going a bit overboard, but:

(Required for fonts other than Type 3) The PostScript name of the font. For Type 3 fonts that include a Name entry in the Type 3 font dictionary, this name shall match the value of that key. For all fonts other than Type 3 this name shall be the same as the value of BaseFont in the font or CIDFont dictionary that refers to this font descriptor.

@petervwyatt petervwyatt added ISO submitted Resolved issue submitted to ISO for approval and removed bug Something isn't working proposed solution Proposed solution is ready for review labels Dec 6, 2021
@petervwyatt petervwyatt added this to the ISO Submission Feb 2022 milestone Dec 6, 2021
@petervwyatt petervwyatt added ISO approved Resolved issue approved by ISO and removed ISO submitted Resolved issue submitted to ISO for approval labels Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ISO approved Resolved issue approved by ISO
Projects
None yet
Development

No branches or pull requests

3 participants