Open mashabow opened 8 years ago
While not explicitly stated, I think that the closest Adobe Tech Note is #5014, which implicitly states this via its examples. (There is also FontType
, which is a fifth operator, though I suspect that it is not necessary for CFF (because its value is implicit in CFF), but for CIDFont resources.)
Thank you for clarifying!
BTW, fontTools' cffLib
can complie any Top DICT operators that appear in Font DICT (see cffLib.py#L1434). How should we treat such invalid entries? Just ignore or undefined behavior? tx -t1
seems to treat the last value of each operator as the actual Top DICT's value.
This is a bug in 'tx'. I will change 'tx' to ignore any such operators: it will just pop the operator and its operands from the stack, and emit a warning.
@mashabow if you think cffLib needs fixing, could you also file an issue on the fontTools repo? Thanks.
The closest I can find to a definition for an FDArray FontDict is from Tech Note 5014 page 31. I include this below. This section excludes only a couple of keys and says otherwise that an FDArray FontDict is a PostScript FontDict, which implies that all other keys are permissible. However, I think this is an oversight in the spec, and I agree with Ken Lunde's list for keys that are actually used. Furthermore, most of the other TopDict keys are used in text layout and. in the context of OpenType, are ignored as they overridden by data in other OpenType tables.
from Page 31, Tech Note 5014. 11 June 1993:
Each font dictionary in a CIDFont of CIDFontType 0 is a font dictionary as described in the PostScript Language Reference Manual, Second Edition, with certain exceptions. These font dictionaries may be Type 1 or Type 3 font dictionaries, but must not include the following entries: Type 1 Exceptions Encoding Array Should not be present in an FDArray font dictionary because the CMap file controls encoding. Charstring Dictionary Should not be present in an FDArray font dictionary because charstring information appears in a data block near the end of the CIDFont file. 32 Adobe CMap and CIDFont Files Specification (11 June 93) Subrs Array Should not be present in an FDArray font dictionary because subroutine information appears in a data block near the end of a CIDFont file along with charstrings and offset and index information. Type 3 Exceptions Encoding Array Should not be present in an FDArray font dictionary because the CMap file controls encoding.
This is Table 5-14 from page 374 of the PostScript Language Reference Manual.
@anthrotype:
if you think cffLib needs fixing, could you also file an issue on the fontTools repo? Thanks.
OK, I will open an issue there.
@kenlunde:
This is Table 5-14 from page 374 of the PostScript Language Reference Manual.
Oh, I missed that table. Thanks. So I may summarize it for CID-keyed CFF as follows, right?
FontMatrix
(default: 0.001 0 0 0.001 0 0
)Private
FontName
Encoding
CharStrings
@mashabow: About your last bullet point, Adobe Tech Note 5014 doesn't have Table 9 nor Table 10. To which document are you referring? 5176, I think.
@kenlunde Oops, I meant 5176, yes.
👌
According to cffwrite_dict.c or absfont.h, it seems only four operators are valid in Font DICT:
FontName
PaintType
FontMatrix
Private
Are they explicitly stated in some technotes? I couldn't find it...