max glyph count for mergeFonts #1755
Replies: 16 comments
-
According to the comments associated with the PR that added this https://adobe-type-tools.github.io/font-tech-notes/pdfs/5176.CFF.pdf#page=17 My initial guess would be that your build is attempting to retain all of the glyph names within the CFF table. Large CFF fonts have tended to be CID-based and don't retain names. There may be no spec-compliant way to do that with CFF-internal names. There's no reason I can see why it wouldn't work to have all the names in a Version 2.0 post table instead. However, getting that workflow working with |
Beta Was this translation helpful? Give feedback.
-
For Source Han we do mergefonts with name keyed sources going to a CID-keyed output. Then build the CID-keyed CFF with that. For variable TTF I have a custom Python script that overrides some things to make it all work. I can post that if that's what you're talking about. |
Beta Was this translation helpful? Give feedback.
-
For mergefonts the command is like The cidfontinfo is like https://github.com/adobe-fonts/source-han-sans/blob/master/ExtraLight/OTC/cidfontinfo.OTC.J
|
Beta Was this translation helpful? Give feedback.
-
As far as I can see, the SourceHanSans fonts contain 65535 charstrings. I have a .pfa file containing the same number of char strings and try to build a CID keyed font from it:
Does this mean that the .pfa can’t be opened because it has too many glyph names? |
Beta Was this translation helpful? Give feedback.
-
The pfas for Source Han are CID-keyed. Those are used as the source to make OTFs. Those also open fine in Glyphs which is something I do all the time. If the pfa you have is name-keyed then it's probably going to fail with tx or mergefonts. If you break it into two pfas that are name-keyed and run mergefonts then it should work. |
Beta Was this translation helpful? Give feedback.
-
As far as I can see the .pfa is CID keyed. Or did I do it wrong? (the format is as seen above). |
Beta Was this translation helpful? Give feedback.
-
What does tx say if you run it on the file?
|
Beta Was this translation helpful? Give feedback.
-
I get the same error. I did generate the .pfa from a .ps file with the |
Beta Was this translation helpful? Give feedback.
-
Well, it looks like that didn't make a CID-keyed pfa then. To really try that way I'd say split it in two like I mentioned above. Then tx should report |
Beta Was this translation helpful? Give feedback.
-
I’ll do that. Thanks. Is there a way to make a proper CID keyed .pfa? |
Beta Was this translation helpful? Give feedback.
-
As far as I know the type1 tool never had any CID specific capability. |
Beta Was this translation helpful? Give feedback.
-
If you have a CID-keyed OTF you can run |
Beta Was this translation helpful? Give feedback.
-
When Glyphs writes any CFF based font, it writes a .ps file, uses type1 to convert it to .pfb (mergefonts to make CID) and then tx to CFF. I don’t write multiple font dicts for CID keyed fonts, yet. That's why it hits the glyph limit. |
Beta Was this translation helpful? Give feedback.
-
I don't understand what you mean. If you use type1 and then mergefonts then it should all work fine. That's not much different from what I'm doing all the time. |
Beta Was this translation helpful? Give feedback.
-
Oh, you mean since you're not doing multiple font dicts you only have a single .pfb? I don't even do it like that. I merge a bunch of random stuff and add the font dicts later. mergefonts will "make" font dicts per source, but I just trash that and redo it with what I want. This is all kind of messy, though. Ideally it would work like you are trying. |
Beta Was this translation helpful? Give feedback.
-
I'm not going to close this yet but I think it's more of a discussion so I'm moving it there. |
Beta Was this translation helpful? Give feedback.
-
When trying to build a font with 65535 glyphs (like SourceHanSans), I get an error
String INDEX limit exceeded:
. I check the code and the limit is set to 65000. Is this possible with mergeFonts or do I miss something.Beta Was this translation helpful? Give feedback.
All reactions