-
Notifications
You must be signed in to change notification settings - Fork 21
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
MultipleSubst may have zero replacement glyphs #673
Comments
What tools enable creation of such a substitution lookup? I know VOLT has no way to specify a null output, and I presumed AFDKO feature code didn't either. |
Side note: when opening issues pertaining to a specific part of the OT spec, it's really helpful if you use the link at the bottom of the page in question. Thanks. |
(Makes me think, One could use a type 2 or even type 4 (ligature) lookup subtable to do a single substitution.) So, Simon, you've made a observation, but you haven't suggested any change. GSUB type 2 was designed to support one-to-many substitutions, and the spec states that the Sequence table must specify sequences with length > 0. However, in the current spec, it doesn't require that MultipleSubstFormat1.sequenceCount must be >0. So, a MultipleSubstFormat1 without any Sequence subtables would seem to provide a one-to-none substitution.
I wouldn't necessarily take the Arial Unicode MS font, which is no longer distributed with any MS products, as a precedent for what the design should be. If ability to delete a glyph from a sequence using a type 2 lookup is useful and desirable, there should be a stronger case for that than "because of Arial Unicode MS". Is the request that spec explicitly sanction type 2 being used for 1->0 substitution? |
I’ve filed a bug in a Microsoft product. Microsoft can decide how busy to fix it. |
I’ll be adding support for zero-replacement substitutions in AFDKO and fontTools soon. |
Here’s one use case for a deletion rule: |
That makes no sense to me whatsoever. The spec also says "The Sequence table offsets are ordered by the Coverage index of the input glyphs", which I read as "for each glyph in the coverage, there is one item in the sequenceOffsets array". It isn't spelled out, but doesn't this imply that sequenceCount should be the number of glyphs in the coverage table? What would be a use case of that not being true? Perhaps some glyphs needs (non-empty) substitutions, and some need empty substitutions. I see no reason why glyphCount shouldn't be allowed to be zero. |
FontCreator supports this since version 12. |
I have proposed explicitly supporting this in FontForge's FEA implementation, as we already do so implicitly. (Fonts that have 0-length mult subs are understood.) |
While the GSUB spec says:
all shapers currently support a substitution rule which deletes a glyph, and Microsoft's own fonts rely on this behaviour.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: