You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The makeotf process uses .fea files for a lot of purposes, including name table overrides. For a while now (since #1133), UTF-8 has been accepted in those files – which is great!
It seems that makeotf writes the nameID 0 string into the CFF TopDict as-is. The CFF TopDict only accepts ASCII.
The solution is to go back to escaped notation – I wonder if this could happen behind the scenes, rather than forcing the user to remember doing this for a single override?
The text was updated successfully, but these errors were encountered:
Okay, I might have mis-interpreted things. The CFF TopDict is not fed by the name table overrides.
The copyright string seems to come directly from the UFO file. When the UFO does not contain a copyright string, there won’t be anything in the TopDict, either.
This is the result of my testing (escaped on the left, UTF-8 on the right):
Given the symptoms, the likely cause of this problem is TX adding the string (probably as a Notice) to the Type1 generated from the UFO, which is then imported by makeotfexe to convert to a CFF2.
The new code (in the addfeatures branch) doesn't work this way. It uses tx to generate a CFF directly from the UFO. So the place to fix this going forward is likely in that path. An easy fix would be to test if the UFO string has non-ASCII characters and not include the string in that case (also issuing a warning).
The question with Type 1 would then be less urgent given that the Type 1 format is officially retired, but perhaps we could do the same thing in that case.
The
makeotf
process uses.fea
files for a lot of purposes, including name table overrides. For a while now (since #1133), UTF-8 has been accepted in those files – which is great!Here is one such override (from https://github.com/adobe-fonts/source-serif/blob/main/familynameIDs.fea):
In the dark past, this would have been
This is all great, and produces .fea files of superior readability.
However, there’s one problem – the copyright string (nameID 0):
currently
previously
The issue:
The following CFF TopDict strings are not in the ASCII range: - Copyright: © 2023 Adobe. All rights reserved, with Reserved Font Name 'Source'. [code: cff-string-not-in-ascii-range] (adobe-fonts/source-code-pro#339)
It seems that makeotf writes the nameID 0 string into the CFF TopDict as-is. The CFF TopDict only accepts ASCII.
The solution is to go back to escaped notation – I wonder if this could happen behind the scenes, rather than forcing the user to remember doing this for a single override?
The text was updated successfully, but these errors were encountered: